class Hanami::CLI::Registry::Prefix
Command
name prefix
@since 0.1.0
Attributes
prefix[R]
@since 0.1.0 @api private
registry[R]
@since 0.1.0 @api private
Public Class Methods
new(registry, prefix, aliases)
click to toggle source
@since 0.1.0 @api private
# File lib/hanami/cli/registry.rb, line 301 def initialize(registry, prefix, aliases) @registry = registry @prefix = prefix registry.set(prefix, nil, aliases) end
Public Instance Methods
register(name, command, aliases: [], **options)
click to toggle source
@since 0.1.0
@see Hanami::CLI::Registry#register
# File lib/hanami/cli/registry.rb, line 311 def register(name, command, aliases: [], **options) command_name = "#{prefix} #{name}" registry.set(command_name, command, aliases, **options) end