Class: Dialekt::Model::BasicProperty::Shape
- Inherits:
-
Object
- Object
- Dialekt::Model::BasicProperty::Shape
- Defined in:
- lib/dialekt/model/basic_property.rb
Overview
Property configuration
Instance Attribute Summary collapse
-
#factory ⇒ Object
readonly
Returns the value of attribute factory.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#transformer ⇒ Object
readonly
Returns the value of attribute transformer.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(name:, type:, factory: nil, transformer: nil) ⇒ Shape
constructor
A new instance of Shape.
Constructor Details
#initialize(name:, type:, factory: nil, transformer: nil) ⇒ Shape
Returns a new instance of Shape.
11 12 13 14 15 16 |
# File 'lib/dialekt/model/basic_property.rb', line 11 def initialize(name:, type:, factory: nil, transformer: nil) @name = name.to_sym @type = type @factory = factory&.call_adapter @transformer = transformer&.call_adapter end |
Instance Attribute Details
#factory ⇒ Object (readonly)
Returns the value of attribute factory.
9 10 11 |
# File 'lib/dialekt/model/basic_property.rb', line 9 def factory @factory end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
9 10 11 |
# File 'lib/dialekt/model/basic_property.rb', line 9 def name @name end |
#transformer ⇒ Object (readonly)
Returns the value of attribute transformer.
9 10 11 |
# File 'lib/dialekt/model/basic_property.rb', line 9 def transformer @transformer end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
9 10 11 |
# File 'lib/dialekt/model/basic_property.rb', line 9 def type @type end |