Class: Aruba::EventBus::NameResolver::SymbolResolver
- Inherits:
-
Object
- Object
- Aruba::EventBus::NameResolver::SymbolResolver
- Includes:
- ResolveHelpers
- Defined in:
- lib/aruba/event_bus/name_resolver.rb
Overview
Convert a symbol in to an event class
Class Method Summary collapse
- .match?(event_id) ⇒ Boolean
-
.supports ⇒ Object
Which types are supported.
Instance Method Summary collapse
Methods included from ResolveHelpers
Class Method Details
.match?(event_id) ⇒ Boolean
101 102 103 |
# File 'lib/aruba/event_bus/name_resolver.rb', line 101 def match?(event_id) event_id.is_a? Symbol end |
.supports ⇒ Object
Which types are supported
106 107 108 |
# File 'lib/aruba/event_bus/name_resolver.rb', line 106 def supports [Symbol] end |
Instance Method Details
#transform(default_namespace, event_id) ⇒ Object
111 112 113 |
# File 'lib/aruba/event_bus/name_resolver.rb', line 111 def transform(default_namespace, event_id) constantize("#{default_namespace}::#{camel_case(event_id)}") end |