]> gitweb.fluxo.info Git - puppet-stdlib.git/commit
(#15872) Add to_bytes function
authorErik Dalén <dalen@spotify.com>
Tue, 7 Aug 2012 21:36:20 +0000 (23:36 +0200)
committerJeff McCune <jeff@puppetlabs.com>
Tue, 14 Aug 2012 15:43:36 +0000 (08:43 -0700)
commit247b69cbc01741257c3d3b72ad75bb62325eaf49
tree9c65541213d5c30e91d3b7e413efc49bf586363c
parentdeafe88e02499a7bdababf0b5dc264fcc3edecf1
(#15872) Add to_bytes function

Converts a string like "2 MB" to the value in bytes. Useful for
comparisons on facts that return a human readable number instead of
machine readable.
lib/puppet/parser/functions/to_bytes.rb [new file with mode: 0644]
spec/unit/puppet/parser/functions/to_bytes_spec.rb [new file with mode: 0755]