lib/puppet_x/coi/jboss/functions/to_bool.rb
# PRIVATE INTERNAL FUNCTION. Casts any value to boolean
#
# @param args [Array] should be only one argument in array
# @return [string] casted value to boolean
PRIVATE INTERNAL FUNCTION. Casts any value to boolean
PRIVATE INTERNAL FUNCTION . Casts any value to boolean
def to_bool_cases(string)
      case string
      when /^$/, '' then false 
      when /^(1|t|y|true|yes)$/  then true
      when /^(0|f|n|false|no)$/  then false
      when /^(undef|undefined)$/ then false 
      else false
      end
    end
def to_bool_cases ( string ) case string when / ^$ / , '' then false when / ^(1|t|y|true|yes)$ / then true when / ^(0|f|n|false|no)$ / then false when / ^(undef|undefined)$ / then false else false end end
PRIVATE INTERNAL FUNCTION.
PRIVATE INTERNAL FUNCTION .
# This is how undef looks like in Puppet ... # We yield false in this case. # Empty string will be false ... # This is not likely to happen ...
casted value to boolean
casted value to boolean
string
string
<not_specific>
args
<not_specific>
should be only one argument in array
should be only one argument in array