Class: MicroBunny::EventLookup
- Inherits:
-
Object
- Object
- MicroBunny::EventLookup
- Defined in:
- lib/microbunny/event_lookup.rb
Instance Method Summary collapse
- #consumer ⇒ Object
- #event ⇒ Object
-
#initialize(name) ⇒ EventLookup
constructor
A new instance of EventLookup.
Constructor Details
#initialize(name) ⇒ EventLookup
Returns a new instance of EventLookup.
3 4 5 |
# File 'lib/microbunny/event_lookup.rb', line 3 def initialize(name) @name = name.is_a?(Symbol) ? camelize(name.to_s) : name end |
Instance Method Details
#consumer ⇒ Object
11 12 13 |
# File 'lib/microbunny/event_lookup.rb', line 11 def consumer constantize(name + "Consumer") end |
#event ⇒ Object
7 8 9 |
# File 'lib/microbunny/event_lookup.rb', line 7 def event constantize(name + "Event") end |