lib/puppet_x/coi/jboss/buildins_utils.rb
# Converts given value to boolean value
Converts given value to boolean value
Converts given value to boolean value
def to_bool
      str = if @target.respond_to?(:empty?)
              @target
            else
              @target.to_s
            end
      return @target != 0 if @target.is_a? Numeric
      return true if @target == true || str =~ /(true|t|yes|y)$/i
      bm = BlankMatcher.new(@target)
      return false if @target == false || bm.blank? || str =~ /(false|f|no|n)$/i
      raise(ArgumentError, "invalid value for Boolean: \"#{@target}\"")
    end
def to_bool str = if @target . respond_to? ( :empty? ) @target else @target . to_s end return @target != 0 if @target . is_a? Numeric return true if @target == true || str =~ / (true|t|yes|y)$ /i bm = BlankMatcher . new ( @target ) return false if @target == false || bm . blank? || str =~ / (false|f|no|n)$ /i raise ( ArgumentError , "invalid value for Boolean: \"#{@target}\"" ) end
Converts given value to boolean value
Converts given value to boolean value