Module: Ohm::DataTypes
- Defined in:
- lib/ohm/datatypes.rb
Defined Under Namespace
Modules: Type Classes: SerializedArray, SerializedHash, SerializedSet, UnixTime
Class Method Summary collapse
Class Method Details
.bool(val) ⇒ Object
23 24 25 26 27 28 29 30 |
# File 'lib/ohm/datatypes.rb', line 23 def self.bool(val) case val when "false", "0" then false when "true", "1" then true else !! val end end |