lib/jamf/ruby_extensions/string/conversions.rb
# Convert the strings "true" and "false"
# (after stripping whitespace and downcasing)
# to TrueClass and FalseClass respectively
#
# Return nil if any other string.
#
# @return [Boolean,nil] the boolean value
#
Convert the strings "true" and "false"
(after stripping whitespace and downcasing)
to TrueClass and FalseClass respectively

Return nil if any other string.
Convert the strings " true " and " false " ( after stripping whitespace and downcasing ) to TrueClass and FalseClass respectively Return nil if any other string .
def j_to_bool
        case strip.downcase
        when 'true' then true
        when 'false' then false
        end 
      end
def j_to_bool case strip . downcase when 'true' then true when 'false' then false end end
Convert the strings "true" and "false"
(after stripping whitespace and downcasing)
to TrueClass and FalseClass respectively
Convert the strings " true " and " false " ( after stripping whitespace and downcasing ) to TrueClass and FalseClass respectively
# case
the boolean value
the boolean value
Boolean,nil