class Athena::Console::Helper::HelperSet
inherits Reference
#
The container that stores various ACON::Helper::Interface
implementations, keyed by their class.
Each application includes a default helper set, but additional ones may be added.
See ACON::Application#helper_set
.
These helpers can be accessed from within a command via the ACON::Command#helper
method.
Constructors#
.new(helpers : Hash(ACON::Helper.class, ACON::Helper::Interface) = Hash(ACON::Helper.class, ACON::Helper::Interface).new)
#
.new(*helpers : ACON::Helper::Interface) : self
#
Methods#
#<<(helper : ACON::Helper::Interface) : Nil
#
Adds the provided helper to self
.
#[](helper_class : T.class) : T forall T
#
Returns the helper of the provided helper_class, or raises if it is not defined.
#[]?(helper_class : T.class) : T | Nil forall T
#
Returns the helper of the provided helper_class, or nil
if it is not defined.
#has?(helper_class : ACON::Helper.class) : Bool
#
Returns true
if self
has a helper for the provided helper_class, otherwise false
.