Class: Her::Collection

Inherits:
Array
  • Object
show all
Defined in:
lib/her/collection.rb

Direct Known Subclasses

PaginatedCollection

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(items = [], metadata = {}, errors = {}) ⇒ Collection

Returns a new instance of Collection.



6
7
8
9
10
# File 'lib/her/collection.rb', line 6

def initialize(items=[], ={}, errors={})
  super(items)
  @metadata = 
  @errors = errors
end

Instance Attribute Details

#errorsObject (readonly)

Returns the value of attribute errors.



3
4
5
# File 'lib/her/collection.rb', line 3

def errors
  @errors
end

#metadataObject (readonly)

Returns the value of attribute metadata.



3
4
5
# File 'lib/her/collection.rb', line 3

def 
  @metadata
end