Class: DelegateCached::ModelData
- Inherits:
-
Object
- Object
- DelegateCached::ModelData
- Defined in:
- lib/delegate_cached/model_data.rb
Instance Attribute Summary collapse
-
#association ⇒ Object
readonly
Returns the value of attribute association.
-
#column ⇒ Object
readonly
Returns the value of attribute column.
-
#model ⇒ Object
readonly
Returns the value of attribute model.
-
#reflection ⇒ Object
readonly
Returns the value of attribute reflection.
Instance Method Summary collapse
-
#initialize(model, column, association, reflection) ⇒ ModelData
constructor
A new instance of ModelData.
- #plural_underscored_model_name ⇒ Object
- #underscored_model_name ⇒ Object
Constructor Details
#initialize(model, column, association, reflection) ⇒ ModelData
Returns a new instance of ModelData.
5 6 7 8 9 10 |
# File 'lib/delegate_cached/model_data.rb', line 5 def initialize(model, column, association, reflection) @model = model @column = column @association = association @reflection = reflection end |
Instance Attribute Details
#association ⇒ Object (readonly)
Returns the value of attribute association.
3 4 5 |
# File 'lib/delegate_cached/model_data.rb', line 3 def association @association end |
#column ⇒ Object (readonly)
Returns the value of attribute column.
3 4 5 |
# File 'lib/delegate_cached/model_data.rb', line 3 def column @column end |
#model ⇒ Object (readonly)
Returns the value of attribute model.
3 4 5 |
# File 'lib/delegate_cached/model_data.rb', line 3 def model @model end |
#reflection ⇒ Object (readonly)
Returns the value of attribute reflection.
3 4 5 |
# File 'lib/delegate_cached/model_data.rb', line 3 def reflection @reflection end |
Instance Method Details
#plural_underscored_model_name ⇒ Object
12 13 14 |
# File 'lib/delegate_cached/model_data.rb', line 12 def plural_underscored_model_name model.to_s.pluralize.underscore end |
#underscored_model_name ⇒ Object
16 17 18 |
# File 'lib/delegate_cached/model_data.rb', line 16 def underscored_model_name model.to_s.underscore end |