Class: Spotify::Models::Category
- Inherits:
-
Object
- Object
- Spotify::Models::Category
- Defined in:
- lib/spotify/models/category.rb
Instance Attribute Summary collapse
-
#href ⇒ Object
readonly
Returns the value of attribute href.
-
#icons ⇒ Object
readonly
Returns the value of attribute icons.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(args = {}) ⇒ Category
constructor
A new instance of Category.
Constructor Details
#initialize(args = {}) ⇒ Category
Returns a new instance of Category.
9 10 11 12 13 14 15 16 17 |
# File 'lib/spotify/models/category.rb', line 9 def initialize(args = {}) args = args.with_indifferent_access icons = args[:icons].map { |icon| Spotify::Models::Image.new(icon) } @href = args[:href] @icons = icons @id = args[:id] @name = args[:name] end |
Instance Attribute Details
#href ⇒ Object (readonly)
Returns the value of attribute href.
7 8 9 |
# File 'lib/spotify/models/category.rb', line 7 def href @href end |
#icons ⇒ Object (readonly)
Returns the value of attribute icons.
7 8 9 |
# File 'lib/spotify/models/category.rb', line 7 def icons @icons end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
7 8 9 |
# File 'lib/spotify/models/category.rb', line 7 def id @id end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
7 8 9 |
# File 'lib/spotify/models/category.rb', line 7 def name @name end |