Class: Rigger::CLI

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

Instance Method Summary collapse

Constructor Details

#initialize(args = ARGV, dsl = DSL, task_execution_service_factory = TaskExecutionService) ⇒ CLI

Returns a new instance of CLI.



7
8
9
10
11
12
13
# File 'lib/rigger/cli.rb', line 7

def initialize(args                           = ARGV,
               dsl                            = DSL,
               task_execution_service_factory = TaskExecutionService)
  @args                           = args
  @dsl                            = dsl
  @task_execution_service_factory = task_execution_service_factory
end

Instance Method Details

#startObject



15
16
17
18
19
20
21
22
23
24
25
26
# File 'lib/rigger/cli.rb', line 15

def start
  @config = @dsl.new
  options = parse_options
  load_builtin_recipes
  load_config_file

  if options[:display_tasks]
    display_tasks
  else
    run_tasks
  end
end