Method: Clashinator::ArrayResource#initialize
- Defined in:
- lib/clashinator/array_resource.rb
#initialize(model, items, paging = { 'cursors' => {} }) ⇒ ArrayResource
Returns a new instance of ArrayResource.
9 10 11 12 13 14 15 |
# File 'lib/clashinator/array_resource.rb', line 9 def initialize(model, items, paging = { 'cursors' => {} }) @model = model @items = as_array_of_model(items) @paging = Clashinator::ArrayResource::Cursor.new( paging['cursors'] ) end |