Class: Pluggy::Lists::ArrayList
- Defined in:
- lib/pluggy/lists/array_list.rb
Overview
A bare JSON array with no envelope at all.
GET /categories declares {type: array} in its schema while its own
example shows an offset envelope -- the spec contradicts itself. The
shape sniffer in Pluggy::Lists.wrap resolves it at runtime, so a caller
gets a working list either way and never has to care which shipped.
Instance Attribute Summary
Attributes inherited from BaseList
#filters, #path, #raw, #results
Instance Method Summary collapse
-
#initialize(payload, klass:, requestor:, path: nil, filters: {}, client: nil) ⇒ ArrayList
constructor
A new instance of ArrayList.
- #more? ⇒ Boolean
- #next_page ⇒ Object
-
#to_ary ⇒ Object
Lets an ArrayList be splatted or passed to Array().
Methods inherited from BaseList
#auto_paging_each, #auto_paging_to_a, #each, #empty?, #inspect, #length
Constructor Details
#initialize(payload, klass:, requestor:, path: nil, filters: {}, client: nil) ⇒ ArrayList
Returns a new instance of ArrayList.
12 13 14 |
# File 'lib/pluggy/lists/array_list.rb', line 12 def initialize(payload, klass:, requestor:, path: nil, filters: {}, client: nil) super end |
Instance Method Details
#more? ⇒ Boolean
16 |
# File 'lib/pluggy/lists/array_list.rb', line 16 def more? = false |
#next_page ⇒ Object
17 |
# File 'lib/pluggy/lists/array_list.rb', line 17 def next_page = nil |
#to_ary ⇒ Object
Lets an ArrayList be splatted or passed to Array().
20 |
# File 'lib/pluggy/lists/array_list.rb', line 20 def to_ary = @results |