Class: Collectively::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/collectively/base.rb

Overview

Collectively Base Collection

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#collectionObject (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