class Balboa::CLI::Application

Constants

CommandNotFound

Public Class Methods

new(command_id) click to toggle source
# File lib/balboa/cli/application.rb, line 8
def initialize(command_id)
  @command_id = command_id.to_s
  @commands = Hash.new { raise CommandNotFound }
end

Public Instance Methods

add_command(key, command) click to toggle source
# File lib/balboa/cli/application.rb, line 13
def add_command(key, command)
  @commands[key.to_s] = command
end
execute() click to toggle source
# File lib/balboa/cli/application.rb, line 17
def execute
  @commands[@command_id].execute
end