Method: String#to_bool

Defined in:
lib/toolbox/boolean.rb

#to_boolObject

Extending String function to be able to convert a String 'true' or 'false' to a boolean true/false. See the Boolean module for usage



7
8
9
# File 'lib/toolbox/boolean.rb', line 7

def to_bool
  (self =~ /^true$/i) == 0
end