Class: Epok::Collection

Inherits:
Object
  • Object
show all
Includes:
Enumerable
Defined in:
lib/epok/collection.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data, id = "id") ⇒ Collection

Returns a new instance of Collection.



7
8
9
# File 'lib/epok/collection.rb', line 7

def initialize(data, id = "id")
  @data = collection(data, id)
end

Instance Attribute Details

#dataObject (readonly)

Returns the value of attribute data.



5
6
7
# File 'lib/epok/collection.rb', line 5

def data
  @data
end

Instance Method Details

#each(&block) ⇒ Object



11
12
13
# File 'lib/epok/collection.rb', line 11

def each(&block)
  data.each(&block)
end