Class: Spotify::Models::CursorbasedPaging

Inherits:
Object
  • Object
show all
Defined in:
lib/spotify/models/cursorbased_paging.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(args = {}, klass) ⇒ CursorbasedPaging

Returns a new instance of CursorbasedPaging.



9
10
11
12
13
14
15
16
17
18
# File 'lib/spotify/models/cursorbased_paging.rb', line 9

def initialize(args = {}, klass)
  args = args.with_indifferent_access

  @href    = args[:href]
  @items   = args[:items].map { |item| klass.new(item) }
  @limit   = args[:limit]
  @next    = args[:next]
  @total   = args[:total]
  @cursors = Cursor.new(args[:cursors])
end

Instance Attribute Details

#cursorsObject (readonly)

Returns the value of attribute cursors.



7
8
9
# File 'lib/spotify/models/cursorbased_paging.rb', line 7

def cursors
  @cursors
end

#hrefObject (readonly)

Returns the value of attribute href.



7
8
9
# File 'lib/spotify/models/cursorbased_paging.rb', line 7

def href
  @href
end

#itemsObject (readonly)

Returns the value of attribute items.



7
8
9
# File 'lib/spotify/models/cursorbased_paging.rb', line 7

def items
  @items
end

#limitObject (readonly)

Returns the value of attribute limit.



7
8
9
# File 'lib/spotify/models/cursorbased_paging.rb', line 7

def limit
  @limit
end

#nextObject (readonly)

Returns the value of attribute next.



7
8
9
# File 'lib/spotify/models/cursorbased_paging.rb', line 7

def next
  @next
end

#totalObject (readonly)

Returns the value of attribute total.



7
8
9
# File 'lib/spotify/models/cursorbased_paging.rb', line 7

def total
  @total
end