module Scripting::Commands::InstanceMethods
Public Instance Methods
command(name, &blk)
click to toggle source
# File lib/scripting/commands.rb, line 58 def command name, &blk options.commands[name] = Command.new(self, name).describe(&blk) end
run_command!(name, *args)
click to toggle source
# File lib/scripting/commands.rb, line 62 def run_command! name, *args command = options.commands[name] if command.nil? help! $stderr.puts "\n\nCommand: #{name} is not known" exit end command.run! *args end