module Athena::Console::Loader::Interface
Overview
Normally the ACON::Application#add
method requires instances of each command to be provided.
ACON::Loader::Interface
provides a way to lazily instantiate only the command(s) being called,
which can be more performant since not every command needs instantiated.
Direct including types
Defined in:
loader/interface.crInstance Method Summary
-
#get(name : String) : ACON::Command
Returns an
ACON::Command
with the provided name. -
#has?(name : String) : Bool
Returns
true
ifself
has a command with the provided name, otherwisefalse
. -
#names : Array(String)
Returns all of the command names defined within
self
.
Instance Method Detail
abstract
def get(name : String) : ACON::Command
#
Returns an ACON::Command
with the provided name.
Raises ACON::Exceptions::CommandNotFound
if it is not defined.
abstract
def has?(name : String) : Bool
#
Returns true
if self
has a command with the provided name, otherwise false
.