Module: Evilution::CLI::Dispatcher Private
- Defined in:
- lib/evilution/cli/dispatcher.rb
This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.
Class Method Summary collapse
- .lookup(symbol) ⇒ Object private
- .register(symbol, klass) ⇒ Object private
- .registered?(symbol) ⇒ Boolean private
Class Method Details
.lookup(symbol) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
11 12 13 |
# File 'lib/evilution/cli/dispatcher.rb', line 11 def lookup(symbol) @commands.fetch(symbol) { raise KeyError, "unknown command: #{symbol.inspect}" } end |
.register(symbol, klass) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
7 8 9 |
# File 'lib/evilution/cli/dispatcher.rb', line 7 def register(symbol, klass) @commands[symbol] = klass end |
.registered?(symbol) ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
15 16 17 |
# File 'lib/evilution/cli/dispatcher.rb', line 15 def registered?(symbol) @commands.key?(symbol) end |