summaryrefslogtreecommitdiff
path: root/lib/puppet/parser/functions/is_integer.rb
diff options
context:
space:
mode:
authorHenrik Lindberg <henrik.lindberg@cloudsmith.com>2014-01-24 00:22:09 +0100
committerHenrik Lindberg <henrik.lindberg@cloudsmith.com>2014-01-24 00:22:09 +0100
commit2c8450d830453e452b819bfb05678768336c3031 (patch)
tree8b7208929b29fd483f912d74b0cdd6e3ccc08654 /lib/puppet/parser/functions/is_integer.rb
parent264dc9bbdee8f04b78f8193d62d17b2ba096d671 (diff)
(PUP-1195) Rephrase documentation for is_integer and is_numeric
The documentation contained references to future decisions about functionality. Text rephrased for clarity.
Diffstat (limited to 'lib/puppet/parser/functions/is_integer.rb')
-rw-r--r--lib/puppet/parser/functions/is_integer.rb8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/puppet/parser/functions/is_integer.rb b/lib/puppet/parser/functions/is_integer.rb
index 3c4874e..c03d28d 100644
--- a/lib/puppet/parser/functions/is_integer.rb
+++ b/lib/puppet/parser/functions/is_integer.rb
@@ -4,10 +4,12 @@
module Puppet::Parser::Functions
newfunction(:is_integer, :type => :rvalue, :doc => <<-EOS
-Returns true if the variable passed to this function is an integer.
+Returns true if the variable passed to this function is an Integer or
+a decimal (base 10) integer in String form. The string may
+start with a '-' (minus). A value of '0' is allowed, but a leading '0' digit may not
+be followed by other digits as this indicates that the value is octal (base 8).
-If the variable is a string it has to be in the correct format of an
-integer.
+If given any other argument `false` is returned.
EOS
) do |arguments|