class AudioAddict::Commands::Base
Public Instance Methods
current_channel()
click to toggle source
# File lib/audio_addict/commands/base.rb, line 29 def current_channel @current_channel ||= radio[Config.channel] end
current_network()
click to toggle source
# File lib/audio_addict/commands/base.rb, line 25 def current_network Config.network end
needs(*config_keys)
click to toggle source
# File lib/audio_addict/commands/base.rb, line 8 def needs(*config_keys) missing = [] config_keys.each do |key| missing.push key unless Config.has_key? key end raise ConfigError, missing if missing.any? end
prompt()
click to toggle source
# File lib/audio_addict/commands/base.rb, line 33 def prompt @prompt ||= TTY::Prompt.new end
radio()
click to toggle source
# File lib/audio_addict/commands/base.rb, line 21 def radio @radio ||= Radio.new current_network end