Class: Desk::Collection

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

Instance Method Summary collapse

Constructor Details

#initialize(response, klass) ⇒ Collection

Returns a new instance of Collection.



4
5
6
7
8
# File 'lib/desk/collection.rb', line 4

def initialize(response, klass)
  @response = response
  super response["_embedded"]["entries"]
  coerce_into klass
end