class Athena::Console::Helper::HelperSet

Overview

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.

Defined in:

helper/helper_set.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(helpers : Hash(ACON::Helper.class, ACON::Helper::Interface) = Hash(ACON::Helper.class, ACON::Helper::Interface).new) #

[View source]
def self.new(*helpers : ACON::Helper::Interface) : self #

[View source]

Instance Method Detail

def <<(helper : ACON::Helper::Interface) : Nil #

Adds the provided helper to self.


[View source]
def [](helper_class : T.class) : T forall T #

Returns the helper of the provided helper_class, or raises if it is not defined.


[View source]
def []?(helper_class : T.class) : T | Nil forall T #

Returns the helper of the provided helper_class, or nil if it is not defined.


[View source]
def has?(helper_class : ACON::Helper.class) : Bool #

Returns true if self has a helper for the provided helper_class, otherwise false.


[View source]