diff options
author | Ken Barber <ken@bob.sh> | 2011-07-28 21:03:33 +0100 |
---|---|---|
committer | Ken Barber <ken@bob.sh> | 2011-07-28 21:03:33 +0100 |
commit | 313df566bf5cfcbef73fc8182ccb07ddf2f13feb (patch) | |
tree | 787e71d3b3f844add2c691f669bfa126ccff49a3 /lib/puppet/parser | |
parent | 635ed82e5cae38b0ba82098c340cbeed70d483c3 (diff) | |
download | puppet-stdlib-313df566bf5cfcbef73fc8182ccb07ddf2f13feb.tar.gz puppet-stdlib-313df566bf5cfcbef73fc8182ccb07ddf2f13feb.tar.bz2 |
(#2) unstub is_numeric function.
Diffstat (limited to 'lib/puppet/parser')
-rw-r--r-- | lib/puppet/parser/functions/is_numeric.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/puppet/parser/functions/is_numeric.rb b/lib/puppet/parser/functions/is_numeric.rb index 96e8674..c2c0fb5 100644 --- a/lib/puppet/parser/functions/is_numeric.rb +++ b/lib/puppet/parser/functions/is_numeric.rb @@ -12,6 +12,14 @@ module Puppet::Parser::Functions "given #{arguments.size} for 1") end + value = arguments[0] + + if value == value.to_f.to_s or value == value.to_i.to_s then + return true + else + return false + end + end end |