Class: Forematter::CommandRunner

Inherits:
Cri::CommandRunner
  • Object
show all
Defined in:
lib/forematter/command_runner.rb

Instance Method Summary collapse

Instance Method Details

#callObject



5
6
7
8
9
10
11
12
13
# File 'lib/forematter/command_runner.rb', line 5

def call
  run
rescue UsageException
  path = [command.supercommand]
  path.unshift(path[0].supercommand) until path[0].nil?
  super_usage = path[1..-1].map { |c| c.name + ' ' }.join
  $stderr.puts "usage: #{super_usage}#{command.usage}"
  exit 1
end