Class: String
Instance Method Summary collapse
Instance Method Details
#to_bool ⇒ Object
8 9 10 11 12 |
# File 'lib/active_redis/base_extensions.rb', line 8 def to_bool return true if ['true', '1', 'yes', 'on', 't'].include? self return false if ['false', '0', 'no', 'off', 'f', 'nil', ''].include? self return nil end |