Class: Cri::Base

Inherits:
Object
  • Object
show all
Includes:
NanDoc::Cli::CommandMethods
Defined in:
lib/nandoc/hacks/cri-hacks.rb

Instance Method Summary collapse

Methods included from NanDoc::Cli::CommandMethods

#command_abort, #command_name, #command_path_assert, #invite_to_more_command_help, #invocation_name

Instance Method Details

#remove_command(command_class) ⇒ Object



6
7
8
9
10
11
12
# File 'lib/nandoc/hacks/cri-hacks.rb', line 6

def remove_command command_class
  if idx = @commands.index{|x| x.kind_of?(command_class) }
    @commands.delete_at(idx)
  else
    command_abort("command not found of class #{command_class}")
  end
end