Class: Restify::Collection
- Inherits:
-
Array
- Object
- Array
- Restify::Collection
- Includes:
- Contextual, Relations
- Defined in:
- lib/restify/collection.rb
Instance Method Summary collapse
-
#initialize(context, data = []) ⇒ Collection
constructor
A new instance of Collection.
Methods included from Relations
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 |