Class: Spotify::Models::Category

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

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#hrefObject (readonly)

Returns the value of attribute href.



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

def href
  @href
end

#iconsObject (readonly)

Returns the value of attribute icons.



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

def icons
  @icons
end

#idObject (readonly)

Returns the value of attribute id.



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

def id
  @id
end

#nameObject (readonly)

Returns the value of attribute name.



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

def name
  @name
end