Class: Gorillib::Factory::Boolean10Factory

Inherits:
BooleanFactory show all
Defined in:
lib/gorillib/model/type/extended.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BooleanFactory

#blankish?, #native?

Methods inherited from ConvertingFactory

#receive

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

.typenameObject



65
# File 'lib/gorillib/model/type/extended.rb', line 65

def self.typename() :boolean_10 ; end

Instance Method Details

#convert(obj) ⇒ Object



68
69
70
71
72
73
74
# File 'lib/gorillib/model/type/extended.rb', line 68

def convert(obj)
  case obj.to_s
  when "0" then false
  when "1" then true
  else          super
  end
end