5 module Puppet::Parser::Functions
6 newfunction(:bool2str, :type => :rvalue, :doc => <<-EOS
7 Converts a boolean to a string.
8 Requires a single boolean as an input.
12 raise(Puppet::ParseError, "bool2str(): Wrong number of arguments " +
13 "given (#{arguments.size} for 1)") if arguments.size < 1
18 # We can have either true or false, and nothing else
19 unless [FalseClass, TrueClass].include?(klass)
20 raise(Puppet::ParseError, 'bool2str(): Requires a boolean to work with')
27 # vim: set ts=2 sw=2 et :