Class: MicroBunny::EventLookup

Inherits:
Object
  • Object
show all
Defined in:
lib/microbunny/event_lookup.rb

Instance Method Summary collapse

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

#consumerObject



11
12
13
# File 'lib/microbunny/event_lookup.rb', line 11

def consumer
  constantize(name + "Consumer")
end

#eventObject



7
8
9
# File 'lib/microbunny/event_lookup.rb', line 7

def event
  constantize(name + "Event")
end