Method: Hackeroo::Cursor.from_response

Defined in:
lib/hackeroo/cursor.rb

.from_response(response, collection_name, klass, client, method_name, method_options) ⇒ Hackeroo::Cursor

Initializes a new Cursor object

Parameters:

  • response (Hash)
  • collection_name (String, Symbol)

    The name of the method to return the collection

  • klass (Class)

    The class to instantiate object in the collection

  • client (Hackeroo::Client)
  • method_name (String, Symbol)
  • method_options (Hash)

Returns:



18
19
20
# File 'lib/hackeroo/cursor.rb', line 18

def self.from_response(response, collection_name, klass, client, method_name, method_options)
  new(response[:body], collection_name, klass, client, method_name, method_options)
end