Class: Tracemake::CLI

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

Overview

Command line interface

Instance Method Summary collapse

Constructor Details

#initialize(argv) ⇒ CLI

Returns a new instance of CLI.



184
185
186
187
# File 'lib/tracemake.rb', line 184

def initialize(argv)
  @argv = argv
  @trace_file = ENV["TRACE_FILE"] || ".make.trace"
end

Instance Method Details

#runObject



189
190
191
192
193
194
195
196
197
198
# File 'lib/tracemake.rb', line 189

def run
  case @argv.shift
  when "shell"
    run_shell
  when "aggregate"
    run_aggregate
  else
    show_usage
  end
end