# frozen_string_literal: true require_relative 'options' module Balboa module CLI class Application CommandNotFound = Class.new(RuntimeError) def initialize(command_id) @command_id = command_id.to_s @commands = Hash.new { fail CommandNotFound } end def add_command(key, command) @commands[key.to_s] = command end def execute @commands[@command_id].execute end end end end