Class: Goaltender::ValueParser::Boolean
- Inherits:
-
Goaltender::ValueParser
- Object
- Goaltender::ValueParser
- Goaltender::ValueParser::Boolean
- Defined in:
- lib/goaltender/value_parser/boolean.rb
Instance Attribute Summary
Attributes inherited from Goaltender::ValueParser
Instance Method Summary collapse
Methods inherited from Goaltender::ValueParser
Constructor Details
This class inherits a constructor from Goaltender::ValueParser
Instance Method Details
#parse ⇒ Object
5 6 7 8 9 10 11 |
# File 'lib/goaltender/value_parser/boolean.rb', line 5 def parse return false unless input_value.present? return true if input_value == "1" return true if input_value == true return true if input_value == "true" return false end |