Update stdlib and concat to 6.1.0 both
[mirror/dsa-puppet.git] / 3rdparty / modules / stdlib / lib / puppet / parser / functions / validate_bool.rb
index d3bf3d0..d6f07af 100644 (file)
@@ -2,25 +2,30 @@
 # validate_bool.rb
 #
 module Puppet::Parser::Functions
-  newfunction(:validate_bool, :doc => <<-'DOC') do |args|
-    Validate that all passed values are either true or false. Abort catalog
-    compilation if any value fails this check.
+  newfunction(:validate_bool, :doc => <<-DOC
+    @summary
+      Validate that all passed values are either true or false. Abort catalog
+      compilation if any value fails this check.
 
-    The following values will pass:
+    @return
+      validate boolean
 
-        $iamtrue = true
-        validate_bool(true)
-        validate_bool(true, true, false, $iamtrue)
+    @example **Usage**
 
-    The following values will fail, causing compilation to abort:
+      The following values will pass:
 
-        $some_array = [ true ]
-        validate_bool("false")
-        validate_bool("true")
-        validate_bool($some_array)
+          $iamtrue = true
+          validate_bool(true)
+          validate_bool(true, true, false, $iamtrue)
 
-    DOC
+      The following values will fail, causing compilation to abort:
 
+          $some_array = [ true ]
+          validate_bool("false")
+          validate_bool("true")
+          validate_bool($some_array)
+      DOC
+             ) do |args|
     if args.empty?
       raise Puppet::ParseError, "validate_bool(): wrong number of arguments (#{args.length}; must be > 0)"
     end