Class: Gorillib::Factory::StringFactory
- Inherits:
-
ConvertingFactory
- Object
- BaseFactory
- ConvertingFactory
- Gorillib::Factory::StringFactory
- Defined in:
- lib/gorillib/factories.rb
Overview
Concrete Factories
Direct Known Subclasses
BinaryFactory, GuidFactory, HostnameFactory, IpAddressFactory
Instance Method Summary collapse
Methods inherited from ConvertingFactory
Methods inherited from BaseFactory
blankish?, #initialize, native?, #receive, register_factory!, typename, #typename
Constructor Details
This class inherits a constructor from Gorillib::Factory::BaseFactory
Instance Method Details
#blankish?(obj) ⇒ Boolean
210 |
# File 'lib/gorillib/factories.rb', line 210 def blankish?(obj) obj.nil? end |
#convert(obj) ⇒ Object
212 |
# File 'lib/gorillib/factories.rb', line 212 def convert(obj) String(obj) end |
#native?(obj) ⇒ Boolean
211 |
# File 'lib/gorillib/factories.rb', line 211 def native?(obj) obj.respond_to?(:to_str) end |