Class: Traktor::NML::Track

Inherits:
Object
  • Object
show all
Defined in:
lib/traktor/nml/track.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#albumObject (readonly)

Returns the value of attribute album.



4
5
6
# File 'lib/traktor/nml/track.rb', line 4

def album
  @album
end

#artistObject (readonly)

Returns the value of attribute artist.



4
5
6
# File 'lib/traktor/nml/track.rb', line 4

def artist
  @artist
end

#bpmObject (readonly)

Returns the value of attribute bpm.



4
5
6
# File 'lib/traktor/nml/track.rb', line 4

def bpm
  @bpm
end

#cuesObject (readonly)

Returns the value of attribute cues.



4
5
6
# File 'lib/traktor/nml/track.rb', line 4

def cues
  @cues
end

#genreObject (readonly)

Returns the value of attribute genre.



4
5
6
# File 'lib/traktor/nml/track.rb', line 4

def genre
  @genre
end

#keyObject (readonly)

Returns the value of attribute key.



4
5
6
# File 'lib/traktor/nml/track.rb', line 4

def key
  @key
end

#labelObject (readonly)

Returns the value of attribute label.



4
5
6
# File 'lib/traktor/nml/track.rb', line 4

def label
  @label
end

#musical_keyObject (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

#playtimeObject (readonly)

Returns the value of attribute playtime.



4
5
6
# File 'lib/traktor/nml/track.rb', line 4

def playtime
  @playtime
end

#primarykeyObject (readonly)

Returns the value of attribute primarykey.



4
5
6
# File 'lib/traktor/nml/track.rb', line 4

def primarykey
  @primarykey
end

#release_dateObject (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

#titleObject (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