Class: Traktor::NML::Track
- Inherits:
-
Object
- Object
- Traktor::NML::Track
- Defined in:
- lib/traktor/nml/track.rb
Instance Attribute Summary collapse
-
#album ⇒ Object
readonly
Returns the value of attribute album.
-
#artist ⇒ Object
readonly
Returns the value of attribute artist.
-
#bpm ⇒ Object
readonly
Returns the value of attribute bpm.
-
#cues ⇒ Object
readonly
Returns the value of attribute cues.
-
#genre ⇒ Object
readonly
Returns the value of attribute genre.
-
#key ⇒ Object
readonly
Returns the value of attribute key.
-
#label ⇒ Object
readonly
Returns the value of attribute label.
-
#musical_key ⇒ Object
readonly
Returns the value of attribute musical_key.
-
#playtime ⇒ Object
readonly
Returns the value of attribute playtime.
-
#primarykey ⇒ Object
readonly
Returns the value of attribute primarykey.
-
#release_date ⇒ Object
readonly
Returns the value of attribute release_date.
-
#title ⇒ Object
readonly
Returns the value of attribute title.
Instance Method Summary collapse
- #[](key) ⇒ Object
-
#initialize(info) ⇒ Track
constructor
A new instance of Track.
Constructor Details
#initialize(info) ⇒ Track
Returns a new instance of Track.
10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/traktor/nml/track.rb', line 10 def initialize(info) @title = info[:title] @artist = info[:artist] @album = info[:album] @primarykey = info[:primarykey] @genre = info[:genre] @label = info[:label] @release_date = info[:release_date] @playtime = info[:playtime] @bpm = info[:bpm] @key = info[:key] @musical_key = info[:musical_key] @cues = info[:cues] end |
Instance Attribute Details
#album ⇒ Object (readonly)
Returns the value of attribute album.
4 5 6 |
# File 'lib/traktor/nml/track.rb', line 4 def album @album end |
#artist ⇒ Object (readonly)
Returns the value of attribute artist.
4 5 6 |
# File 'lib/traktor/nml/track.rb', line 4 def artist @artist end |
#bpm ⇒ Object (readonly)
Returns the value of attribute bpm.
4 5 6 |
# File 'lib/traktor/nml/track.rb', line 4 def bpm @bpm end |
#cues ⇒ Object (readonly)
Returns the value of attribute cues.
4 5 6 |
# File 'lib/traktor/nml/track.rb', line 4 def cues @cues end |
#genre ⇒ Object (readonly)
Returns the value of attribute genre.
4 5 6 |
# File 'lib/traktor/nml/track.rb', line 4 def genre @genre end |
#key ⇒ Object (readonly)
Returns the value of attribute key.
4 5 6 |
# File 'lib/traktor/nml/track.rb', line 4 def key @key end |
#label ⇒ Object (readonly)
Returns the value of attribute label.
4 5 6 |
# File 'lib/traktor/nml/track.rb', line 4 def label @label end |
#musical_key ⇒ Object (readonly)
Returns the value of attribute musical_key.
4 5 6 |
# File 'lib/traktor/nml/track.rb', line 4 def musical_key @musical_key end |
#playtime ⇒ Object (readonly)
Returns the value of attribute playtime.
4 5 6 |
# File 'lib/traktor/nml/track.rb', line 4 def playtime @playtime end |
#primarykey ⇒ Object (readonly)
Returns the value of attribute primarykey.
4 5 6 |
# File 'lib/traktor/nml/track.rb', line 4 def primarykey @primarykey end |
#release_date ⇒ Object (readonly)
Returns the value of attribute release_date.
4 5 6 |
# File 'lib/traktor/nml/track.rb', line 4 def release_date @release_date end |
#title ⇒ Object (readonly)
Returns the value of attribute title.
4 5 6 |
# File 'lib/traktor/nml/track.rb', line 4 def title @title end |
Instance Method Details
#[](key) ⇒ Object
25 26 27 |
# File 'lib/traktor/nml/track.rb', line 25 def [](key) return self.instance_variable_get("@#{key.to_s}") end |