Module: Hanami::CLI::Registry
- Defined in:
- gems/gems/hanami-cli-0.3.1/lib/hanami/cli/registry.rb
Overview
Registry mixin
Defined Under Namespace
Classes: Prefix
Constant Summary
- COMMAND_NAME_SEPARATOR =
" ".freeze
Instance Method Summary collapse
-
#after(command_name, callback = nil, &blk) ⇒ Object
Register an after callback.
-
#before(command_name, callback = nil, &blk) ⇒ Object
Register a before callback.
-
#register(name, command = nil, aliases: [], **options) ⇒ Object
Register a command.
Instance Method Details
#after(command_name, callback = nil, &blk) ⇒ Object
Register an after callback.
Source: | on GitHub
def after(command_name, callback = nil, &blk) command(command_name).after_callbacks.append(&_callback(callback, blk)) end |
#before(command_name, callback = nil, &blk) ⇒ Object
Register a before callback.
Source: | on GitHub
def before(command_name, callback = nil, &blk) command(command_name).before_callbacks.append(&_callback(callback, blk)) end |