Class: CUI8Tracks::CLI

Inherits:
Object
  • Object
show all
Defined in:
lib/cui8tracks/cli.rb

Class Method Summary collapse

Class Method Details

.execute(stdout, arguments = []) ⇒ Object



3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# File 'lib/cui8tracks/cli.rb', line 3

def self.execute(stdout, arguments=[])

  puts CUI8Tracks::BANNER

  pit = Pit.get('8tracks_login', :require => {
      'username' => 'username',
      'password' => 'password',
    })

  session = CUI8Tracks::Session.new
  session.load_config(ARGV)
  session.authorize(pit['username'], pit['password'])
  session.start_input_thread
  session.play

end