lib/inch/cli/command_parser.rb in inch-0.3.0 vs lib/inch/cli/command_parser.rb in inch-0.3.1.rc1
- old
+ new
@@ -42,11 +42,11 @@
# are specified or
attr_accessor :default_command
end
self.commands = {}
-
+
# Convenience method to create a new CommandParser and call {#run}
# @return (see #run)
def self.run(*args)
new.run(*args)
end
@@ -67,15 +67,15 @@
def commands
self.class.commands
end
def list_commands
- trace "Usage: inch <command> [options]"
- trace
- trace "Commands:"
+ ui.trace "Usage: inch <command> [options]"
+ ui.trace
+ ui.trace "Commands:"
commands.keys.sort_by {|k| k.to_s }.each do |command_name|
command = commands[command_name].new
- trace " %-8s %s" % [command_name, command.description]
+ ui.trace " %-8s %s" % [command_name, command.description]
end
end
# Runs the {Command} object matching the command name of the first
# argument.