Class: Restify::Collection

Inherits:
Array
  • Object
show all
Includes:
Contextual, Relations
Defined in:
lib/restify/collection.rb

Instance Method Summary collapse

Methods included from Relations

#rel, #rel?

Methods included from Contextual

#follow, #relations, #response

Constructor Details

#initialize(context, data = []) ⇒ Collection

Returns a new instance of Collection.



7
8
9
10
11
12
13
# File 'lib/restify/collection.rb', line 7

def initialize(context, data = [])
  @context = context

  super data

  map! {|item| @context.inherit_value(item) }
end