Class: Qc::CommandRunner

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

Constant Summary collapse

DEFAULT_FILE_EXTENSIONS =
'cs,py'
DEFAULT_IGNORED_FILES =
['AssemblyInfo.cs']
SUPPORTED_COMMANDS =
i( logout init push compile backtest open)
COMPILE_POLLING_DELAY_IN_SECONDS =
2
BACKTEST_DELAY_IN_SECONDS =
4

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(quant_connect_proxy, options = OpenStruct.new) ⇒ CommandRunner

Returns a new instance of CommandRunner.



13
14
15
16
17
# File 'lib/qc/command_runner.rb', line 13

def initialize(quant_connect_proxy, options = OpenStruct.new)
  @quant_connect_proxy = quant_connect_proxy
  @project_settings = read_project_settings
  @options = options
end

Instance Attribute Details

#optionsObject (readonly)

Returns the value of attribute options.



10
11
12
# File 'lib/qc/command_runner.rb', line 10

def options
  @options
end

#project_settingsObject

Returns the value of attribute project_settings.



11
12
13
# File 'lib/qc/command_runner.rb', line 11

def project_settings
  @project_settings
end

#quant_connect_proxyObject (readonly)

Returns the value of attribute quant_connect_proxy.



10
11
12
# File 'lib/qc/command_runner.rb', line 10

def quant_connect_proxy
  @quant_connect_proxy
end

Instance Method Details

#run(command) ⇒ Object



19
20
21
22
23
24
25
26
27
# File 'lib/qc/command_runner.rb', line 19

def run(command)
  if command == :login
    do_run(command)
  else
     do
      do_run(command)
    end
  end
end

#run_defaultObject



29
30
31
# File 'lib/qc/command_runner.rb', line 29

def run_default
  run(:default)
end