Class: Mpc::Song
- Inherits:
-
Object
- Object
- Mpc::Song
- Defined in:
- lib/mpc/song.rb
Instance Method Summary collapse
-
#initialize(options) ⇒ Song
constructor
A new instance of Song.
- #to_s ⇒ Object
Constructor Details
#initialize(options) ⇒ Song
Returns a new instance of Song.
4 5 6 |
# File 'lib/mpc/song.rb', line 4 def initialize() @options = end |
Instance Method Details
#to_s ⇒ Object
8 9 10 11 12 13 14 |
# File 'lib/mpc/song.rb', line 8 def to_s if @options[:Artist].empty? || @options[:Title].empty? @options[:file] else "#{@options[:Artist]} - #{@options[:Title]}" end end |