Class: Spotify::Models::Image

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(args = {}) ⇒ Image

Sets the arguments to its variables.

Parameters:

  • args (Hash) (defaults to: {})

    the arguments that will be placed on each variable.



16
17
18
19
20
21
22
# File 'lib/spotify/models/image.rb', line 16

def initialize(args = {})
  args = Hash(args).with_indifferent_access

  @height = args[:height]
  @url    = args[:url]
  @width  = args[:width]
end

Instance Attribute Details

#heightObject (readonly)

Returns the value of attribute height.



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

def height
  @height
end

#urlObject (readonly)

Returns the value of attribute url.



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

def url
  @url
end

#widthObject (readonly)

Returns the value of attribute width.



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

def width
  @width
end