Method: Doing::StringQuery#to_bool

Defined in:
lib/doing/string/query.rb

#to_boolBoolean

Returns a bool representation of the string.

Returns:

  • (Boolean)

    Bool representation of the object.



130
131
132
133
134
135
136
137
# File 'lib/doing/string/query.rb', line 130

def to_bool
  case self
  when /^[yt1]/i
    true
  else
    false
  end
end