Class: TurboTest::Command::Top

Inherits:
Samovar::Command
  • Object
show all
Defined in:
lib/turbo_test/command/top.rb

Overview

The top level command for the ‘falcon` executable.

Instance Method Summary collapse

Instance Method Details

#callObject

Prepare the environment and invoke the sub-command.



34
35
36
37
38
39
40
41
42
# File 'lib/turbo_test/command/top.rb', line 34

def call
  if @options[:version]
    puts "#{self.name} v#{VERSION}"
  elsif @options[:help]
    self.print_usage
  else
    @command.call
  end
end

#command=(value) ⇒ Object

The nested command to execute.



28
29
30
31
# File 'lib/turbo_test/command/top.rb', line 28

nested :command, {
  'run' => Run,
  'list' => List,
}, default: 'run'