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

#created_atObject

Returns the value of attribute created_at.



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

def created_at
  @created_at
end

#durationObject

Returns the value of attribute duration.



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

def duration
  @duration
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

#referenceObject

Returns the value of attribute reference.



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

def reference
  @reference
end

#tagsObject

Returns the value of attribute tags.



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

def tags
  @tags
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