Class: Adminable::Attributes::Association
- Inherits:
-
Object
- Object
- Adminable::Attributes::Association
- Defined in:
- lib/adminable/attributes/association.rb
Instance Attribute Summary collapse
-
#all ⇒ Object
readonly
Returns the value of attribute all.
-
#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 @all = Adminable::EntriesPresenter.new(@model) end |
Instance Attribute Details
#all ⇒ Object (readonly)
Returns the value of attribute all.
4 5 6 |
# File 'lib/adminable/attributes/association.rb', line 4 def all @all 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 |