Class: Gorillib::Factory::ConvertingFactory
- Inherits:
-
BaseFactory
- Object
- BaseFactory
- Gorillib::Factory::ConvertingFactory
- Defined in:
- lib/gorillib/model/factories.rb
Direct Known Subclasses
ApplyProcFactory, BooleanFactory, ComplexFactory, DateFactory, EnumerableFactory, EpochTimeFactory, FloatFactory, IntegerFactory, PathnameFactory, RationalFactory, RegexpFactory, StringFactory, SymbolFactory, TimeFactory, UrlFactory
Instance Method Summary collapse
Methods inherited from BaseFactory
blankish?, #blankish?, #initialize, #native?, native?, typename, #typename
Constructor Details
This class inherits a constructor from Gorillib::Factory::BaseFactory
Instance Method Details
#receive(obj) ⇒ Object
128 129 130 131 132 133 134 |
# File 'lib/gorillib/model/factories.rb', line 128 def receive(obj) return nil if blankish?(obj) return obj if native?(obj) convert(obj) rescue NoMethodError, TypeError, RangeError, ArgumentError => err mismatched!(obj, err., err.backtrace) end |