Class: Colonization::ModelField
- Inherits:
-
ModelEntity
- Object
- ModelEntity
- Colonization::ModelField
- Defined in:
- lib/colonization/model_field.rb
Instance Attribute Summary collapse
-
#field ⇒ Object
readonly
Returns the value of attribute field.
-
#model ⇒ Object
readonly
Returns the value of attribute model.
-
#strategy ⇒ Object
readonly
Returns the value of attribute strategy.
Instance Method Summary collapse
-
#initialize(model, field, values_generator, strategy) ⇒ ModelField
constructor
A new instance of ModelField.
- #name ⇒ Object
- #value ⇒ Object
Constructor Details
#initialize(model, field, values_generator, strategy) ⇒ ModelField
8 9 10 11 12 13 |
# File 'lib/colonization/model_field.rb', line 8 def initialize(model, field, values_generator, strategy) @model = model @field = field @values_generator = values_generator @strategy = strategy end |
Instance Attribute Details
#field ⇒ Object (readonly)
Returns the value of attribute field.
6 7 8 |
# File 'lib/colonization/model_field.rb', line 6 def field @field end |
#model ⇒ Object (readonly)
Returns the value of attribute model.
6 7 8 |
# File 'lib/colonization/model_field.rb', line 6 def model @model end |
#strategy ⇒ Object (readonly)
Returns the value of attribute strategy.
6 7 8 |
# File 'lib/colonization/model_field.rb', line 6 def strategy @strategy end |
Instance Method Details
#name ⇒ Object
15 16 17 |
# File 'lib/colonization/model_field.rb', line 15 def name field end |
#value ⇒ Object
19 20 21 |
# File 'lib/colonization/model_field.rb', line 19 def value values_generator.call end |