Class: Boolean

Inherits:
Object show all
Defined in:
lib/mongo_doc/ext/boolean_class.rb

Class Method Summary collapse

Class Method Details

.cast_from_string(value) ⇒ Object



2
3
4
# File 'lib/mongo_doc/ext/boolean_class.rb', line 2

def self.cast_from_string(value)
  value == '1' || value.downcase == 'true'
end