Class: SimpleEnumeration::Types::BaseFactory
- Inherits:
-
Object
- Object
- SimpleEnumeration::Types::BaseFactory
- Defined in:
- lib/simple_enumeration/types/base_factory.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#definition ⇒ Object
readonly
Returns the value of attribute definition.
-
#enum_class ⇒ Object
readonly
Returns the value of attribute enum_class.
Class Method Summary collapse
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(enum_class:, definition:) ⇒ BaseFactory
constructor
A new instance of BaseFactory.
Constructor Details
#initialize(enum_class:, definition:) ⇒ BaseFactory
Returns a new instance of BaseFactory.
8 9 10 11 |
# File 'lib/simple_enumeration/types/base_factory.rb', line 8 def initialize(enum_class:, definition:) @enum_class = enum_class @definition = definition end |
Instance Attribute Details
#definition ⇒ Object (readonly)
Returns the value of attribute definition.
6 7 8 |
# File 'lib/simple_enumeration/types/base_factory.rb', line 6 def definition @definition end |
#enum_class ⇒ Object (readonly)
Returns the value of attribute enum_class.
6 7 8 |
# File 'lib/simple_enumeration/types/base_factory.rb', line 6 def enum_class @enum_class end |
Class Method Details
.call(*params, **options, &block) ⇒ Object
13 14 15 |
# File 'lib/simple_enumeration/types/base_factory.rb', line 13 def self.call(*params, **, &block) new(*params, **).call(&block) end |