Class: Adminable::Attributes::Association
- Inherits:
-
Object
- Object
- Adminable::Attributes::Association
- Defined in:
- lib/adminable/attributes/association.rb
Instance Attribute Summary collapse
-
#entries ⇒ Object
readonly
Returns the value of attribute entries.
-
#model ⇒ Object
readonly
Returns the value of attribute model.
-
#reflection ⇒ Object
readonly
Returns the value of attribute reflection.
Instance Method Summary collapse
-
#initialize(reflection) ⇒ Association
constructor
A new instance of Association.
Constructor Details
#initialize(reflection) ⇒ Association
Returns a new instance of Association.
7 8 9 10 11 |
# File 'lib/adminable/attributes/association.rb', line 7 def initialize(reflection) @reflection = reflection @model = @reflection.klass @entries = Adminable::Presenters::Entries.new(@model) end |
Instance Attribute Details
#entries ⇒ Object (readonly)
Returns the value of attribute entries.
4 5 6 |
# File 'lib/adminable/attributes/association.rb', line 4 def entries @entries end |
#model ⇒ Object (readonly)
Returns the value of attribute model.
4 5 6 |
# File 'lib/adminable/attributes/association.rb', line 4 def model @model end |
#reflection ⇒ Object (readonly)
Returns the value of attribute reflection.
4 5 6 |
# File 'lib/adminable/attributes/association.rb', line 4 def reflection @reflection end |