Class: Epok::Collection
- Inherits:
-
Object
- Object
- Epok::Collection
- Includes:
- Enumerable
- Defined in:
- lib/epok/collection.rb
Instance Attribute Summary collapse
-
#data ⇒ Object
readonly
Returns the value of attribute data.
Instance Method Summary collapse
- #each(&block) ⇒ Object
-
#initialize(data, id = "id") ⇒ Collection
constructor
A new instance of Collection.
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
#data ⇒ Object (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 |