Class: Siilar::Struct::Track

Inherits:
Base
  • Object
show all
Defined in:
lib/siilar/struct/track.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from Siilar::Struct::Base

Instance Attribute Details

#durationObject

Returns the value of attribute duration.



5
6
7
# File 'lib/siilar/struct/track.rb', line 5

def duration
  @duration
end

#external_idObject

Returns the value of attribute external_id.



5
6
7
# File 'lib/siilar/struct/track.rb', line 5

def external_id
  @external_id
end

#hashObject

Returns the value of attribute hash.



5
6
7
# File 'lib/siilar/struct/track.rb', line 5

def hash
  @hash
end

#idObject

Returns the value of attribute id.



5
6
7
# File 'lib/siilar/struct/track.rb', line 5

def id
  @id
end

#isrcObject

Returns the value of attribute isrc.



5
6
7
# File 'lib/siilar/struct/track.rb', line 5

def isrc
  @isrc
end

#popularityObject

Returns the value of attribute popularity.



5
6
7
# File 'lib/siilar/struct/track.rb', line 5

def popularity
  @popularity
end

#titleObject

Returns the value of attribute title.



5
6
7
# File 'lib/siilar/struct/track.rb', line 5

def title
  @title
end

#yearObject

Returns the value of attribute year.



5
6
7
# File 'lib/siilar/struct/track.rb', line 5

def year
  @year
end

Instance Method Details

#albumObject



7
8
9
# File 'lib/siilar/struct/track.rb', line 7

def album
  @album ||= {}
end

#album=(attrs) ⇒ Object



11
12
13
14
15
# File 'lib/siilar/struct/track.rb', line 11

def album=(attrs)
  if attrs
    @album = Struct::Album.new(attrs)
  end
end

#artistObject



17
18
19
# File 'lib/siilar/struct/track.rb', line 17

def artist
  @artist ||= {}
end

#artist=(attrs) ⇒ Object



21
22
23
24
25
# File 'lib/siilar/struct/track.rb', line 21

def artist=(attrs)
  if attrs
    @artist = Struct::Artist.new(attrs)
  end
end