Class: Increase::ResponseArray

Inherits:
Array
  • Object
show all
Defined in:
lib/increase/response_array.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(array, full_response: nil, response: nil) ⇒ ResponseArray

Returns a new instance of ResponseArray.



5
6
7
8
9
# File 'lib/increase/response_array.rb', line 5

def initialize(array, full_response: nil, response: nil)
  @full_response = full_response
  @response = response
  super(array)
end

Instance Attribute Details

#responseObject (readonly)

Returns the value of attribute response.



3
4
5
# File 'lib/increase/response_array.rb', line 3

def response
  @response
end

Instance Method Details

#next_cursorObject



15
16
17
# File 'lib/increase/response_array.rb', line 15

def next_cursor
  wrapped&.dig("next_cursor")
end

#wrappedObject



11
12
13
# File 'lib/increase/response_array.rb', line 11

def wrapped
  @full_response
end