Class: AudioAddict::Commands::NowCmd

Inherits:
Base
  • Object
show all
Defined in:
lib/audio_addict/commands/now.rb

Instance Method Summary collapse

Methods inherited from Base

#current_channel, #current_network, #needs, #prompt, #radio, #require_premium_account

Instance Method Details

#runObject



11
12
13
14
15
16
17
18
19
20
21
# File 'lib/audio_addict/commands/now.rb', line 11

def run
  needs :network, :channel

  say "b`  Network `: g`#{radio.name}` # #{radio.network}"
  say "b`  Channel `: g`#{current_channel.name}` # #{current_channel.key}"
  say 'b`    Track `: ... '

  track = current_channel.current_track
  say "b`    Track `: g`#{track.title.strip}`", replace: true
  say "b`       By `: g`#{track.artist.strip}`"
end