Class: Spotify::Models::Paging
- Inherits:
-
Object
- Object
- Spotify::Models::Paging
- Defined in:
- lib/spotify/models/paging.rb
Instance Attribute Summary collapse
-
#href ⇒ Object
readonly
Returns the value of attribute href.
-
#items ⇒ Object
readonly
Returns the value of attribute items.
-
#limit ⇒ Object
readonly
Returns the value of attribute limit.
-
#next ⇒ Object
readonly
Returns the value of attribute next.
-
#offset ⇒ Object
readonly
Returns the value of attribute offset.
-
#previous ⇒ Object
readonly
Returns the value of attribute previous.
-
#total ⇒ Object
readonly
Returns the value of attribute total.
Instance Method Summary collapse
-
#initialize(args = {}, klass) ⇒ Paging
constructor
Sets the arguments to its variables.
Constructor Details
#initialize(args = {}, klass) ⇒ Paging
Sets the arguments to its variables.
19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/spotify/models/paging.rb', line 19 def initialize(args = {}, klass) args = Hash(args).with_indifferent_access # Arrays items = Array(args[:items]).map { |i| klass.new(i) } @href = args[:href] @items = items @limit = args[:limit] @next = args[:next] @offset = args[:offset] @previous = args[:previous] @total = args[:total] end |
Instance Attribute Details
#href ⇒ Object (readonly)
Returns the value of attribute href.
7 8 9 |
# File 'lib/spotify/models/paging.rb', line 7 def href @href end |
#items ⇒ Object (readonly)
Returns the value of attribute items.
7 8 9 |
# File 'lib/spotify/models/paging.rb', line 7 def items @items end |
#limit ⇒ Object (readonly)
Returns the value of attribute limit.
7 8 9 |
# File 'lib/spotify/models/paging.rb', line 7 def limit @limit end |
#next ⇒ Object (readonly)
Returns the value of attribute next.
7 8 9 |
# File 'lib/spotify/models/paging.rb', line 7 def next @next end |
#offset ⇒ Object (readonly)
Returns the value of attribute offset.
7 8 9 |
# File 'lib/spotify/models/paging.rb', line 7 def offset @offset end |
#previous ⇒ Object (readonly)
Returns the value of attribute previous.
7 8 9 |
# File 'lib/spotify/models/paging.rb', line 7 def previous @previous end |
#total ⇒ Object (readonly)
Returns the value of attribute total.
7 8 9 |
# File 'lib/spotify/models/paging.rb', line 7 def total @total end |