Class: Songbirdsh::Command::List

Inherits:
Object
  • Object
show all
Includes:
Songbirdsh::Command
Defined in:
lib/songbirdsh/command/list.rb

Instance Attribute Summary

Attributes included from Songbirdsh::Command

#help, #usage

Instance Method Summary collapse

Methods included from Songbirdsh::Command

included, #initialize, load

Instance Method Details

#show(time, track) ⇒ Object



20
21
22
23
# File 'lib/songbirdsh/command/list.rb', line 20

def show time, track
  return unless @terms.empty? or @terms.all? {|term| track.search_string.include? term }
  puts time ? "#{time.to_s.foreground(:blue)}\n\t#{track}" : track
end