Class: Eve::Registry
- Inherits:
-
Object
- Object
- Eve::Registry
- Defined in:
- lib/eve/registry.rb
Direct Known Subclasses
Class Method Summary collapse
Class Method Details
.handle(app, cmd, display_messages) ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/eve/registry.rb', line 10 def self.handle(app,cmd,) result = app.default_result action, data = action_and_input(cmd) inner_action, inner_data = action_and_input(data) if available[action].include?(inner_action) result = send(Application.methodize("call_#{action}_#{inner_action}"), app, result, inner_data, ) else result = send(Application.methodize("call_#{action}"), app, result, data, ) end result end |
.handle?(cmd) ⇒ Boolean
5 6 7 8 |
# File 'lib/eve/registry.rb', line 5 def self.handle?(cmd) action, data = action_and_input(cmd) available.include?(action) end |