Class: Pika::App

Inherits:
Thor
  • Object
show all
Defined in:
lib/pika/app.rb

Instance Method Summary collapse

Instance Method Details

#syncObject



28
29
30
31
32
33
34
35
36
37
38
39
40
41
# File 'lib/pika/app.rb', line 28

def sync
  config_file = options[:input]
  playlist_file = options[:local_playlist]
  # playlist_file has precedence over pika config file
  if playlist_file and File.exists?(playlist_file)
    Operator.new.status(File.open(playlist_file).read, true)
  else
    if File.exist? config_file
      Operator.new.status(File.expand_path config_file)
    else
      abort "Couldn't find Pika config file '#{config_file}'"
    end
  end
end

#versionObject



11
12
13
# File 'lib/pika/app.rb', line 11

def version
  say "Pika version #{VERSION}"
end