Class: Gorillib::Factory::Boolean10Factory
- Inherits:
-
BooleanFactory
- Object
- BaseFactory
- ConvertingFactory
- BooleanFactory
- Gorillib::Factory::Boolean10Factory
- Defined in:
- lib/gorillib/type/extended.rb
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from BooleanFactory
Methods inherited from ConvertingFactory
Methods inherited from BaseFactory
blankish?, #blankish?, #initialize, native?, #native?, #receive, #typename
Constructor Details
This class inherits a constructor from Gorillib::Factory::BaseFactory
Class Method Details
.typename ⇒ Object
69 |
# File 'lib/gorillib/type/extended.rb', line 69 def self.typename() :boolean_10 ; end |
Instance Method Details
#convert(obj) ⇒ Object
72 73 74 75 76 77 78 |
# File 'lib/gorillib/type/extended.rb', line 72 def convert(obj) case obj.to_s when "0" then false when "1" then true else super end end |