Class: Collectively::Base
- Inherits:
-
Object
- Object
- Collectively::Base
- Defined in:
- lib/collectively/base.rb
Overview
Collectively Base Collection
Instance Attribute Summary collapse
-
#collection ⇒ Object
readonly
Initializes a Collection for a given relation or array of ActiveRecord objects.
Instance Method Summary collapse
-
#initialize(relation_or_array) ⇒ Base
constructor
A new instance of Base.
Constructor Details
#initialize(relation_or_array) ⇒ Base
Returns a new instance of Base.
5 6 7 |
# File 'lib/collectively/base.rb', line 5 def initialize(relation_or_array) @collection = relation_or_array end |
Instance Attribute Details
#collection ⇒ Object (readonly)
Initializes a Collection for a given relation or array of ActiveRecord objects
4 5 6 |
# File 'lib/collectively/base.rb', line 4 def collection @collection end |