Module: PactBroker::Events

Extended by:
Events
Included in:
Events
Defined in:
lib/pact_broker/events/event.rb,
lib/pact_broker/events/publisher.rb,
lib/pact_broker/events/subscriber.rb,
lib/pact_broker/events/subscriber.rb

Defined Under Namespace

Modules: Publisher Classes: Event, TemporaryListeners

Instance Method Summary collapse

Instance Method Details

#subscribe(*args) ⇒ Object



34
35
36
37
38
39
40
41
42
43
44
# File 'lib/pact_broker/events/subscriber.rb', line 34

def subscribe(*args)
  if block_given?
    result = nil
    TemporaryListeners.subscribe(*args) do
      result = yield
    end
    result
  else
    Wisper.subscribe(*args)
  end
end

#unsubscribe(*args) ⇒ Object



46
47
48
# File 'lib/pact_broker/events/subscriber.rb', line 46

def unsubscribe(*args)
  Wisper.unsubscribe(*args)
end