- raise(Puppet::ParseError, "bool2num(): Wrong number of arguments " +
- "given (#{arguments.size} for 1)") if arguments.size < 1
+ > *Note:*
+ since Puppet 5.0.0 it is possible to create new data types for almost any
+ datatype using the type system and the built-in
+ [`Numeric.new`](https://puppet.com/docs/puppet/latest/function.html#conversion-to-numeric),
+ [`Integer.new`](https://puppet.com/docs/puppet/latest/function.html#conversion-to-integer), and
+ [`Float.new`](https://puppet.com/docs/puppet/latest/function.html#conversion-to-float)
+ function are used to convert to numeric values.
+ ```
+ notice(Integer(false)) # Notices 0
+ notice(Float(true)) # Notices 1.0
+ ```
+
+ @return [Integer] The converted value as a number
+ DOC
+ ) do |arguments|
+
+ raise(Puppet::ParseError, "bool2num(): Wrong number of arguments given (#{arguments.size} for 1)") if arguments.empty?