Class: Qc::Console

Inherits:
Object
  • Object
show all
Defined in:
lib/qc/console.rb

Instance Method Summary collapse

Constructor Details

#initializeConsole

Returns a new instance of Console.



3
4
# File 'lib/qc/console.rb', line 3

def initialize
end

Instance Method Details

#run(argv) ⇒ Object



6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# File 'lib/qc/console.rb', line 6

def run(argv)
  options = parse_options(argv)

  command = argv[0]
  client = Qc::CommandRunner.new(quant_connect_proxy)
  success = begin
    if command
      client.run(command.to_sym)
    else
      client.run_default
    end
  rescue StandardError => error
    puts "Error: #{error}"
    false
  end

  success
end