Method: Workable::Collection#initialize

Defined in:
lib/workable/collection.rb

#initialize(data:, next_page_method:, transform_mapping:, root_key:, paging: nil) ⇒ Collection

Returns a new instance of Collection.

[View source]

8
9
10
11
12
13
14
15
16
17
# File 'lib/workable/collection.rb', line 8

def initialize(data:, next_page_method:, transform_mapping:, root_key:, paging: nil)
  @data = data

  if paging
    @next_page         = paging['next']
    @next_page_method  = next_page_method
    @transform_mapping = transform_mapping
    @root_key          = root_key
  end
end