Method: Doing::StringQuery#truthy?
- Defined in:
- lib/doing/string/query.rb
#truthy? ⇒ Boolean
Test string for truthiness (0, "f", "false", "n", "no" all return false, case insensitive, otherwise true)
117 118 119 120 121 122 123 |
# File 'lib/doing/string/query.rb', line 117 def truthy? if self =~ /^(0|f(alse)?|n(o)?)$/i false else true end end |