Class: MandrillEvent::NotificationAdapter

Inherits:
Struct
  • Object
show all
Defined in:
lib/mandrill_event.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#subscriberObject

Returns the value of attribute subscriber

Returns:

  • (Object)

    the current value of subscriber



42
43
44
# File 'lib/mandrill_event.rb', line 42

def subscriber
  @subscriber
end

Class Method Details

.call(callable) ⇒ Object



43
44
45
# File 'lib/mandrill_event.rb', line 43

def self.call(callable)
  new(callable)
end

Instance Method Details

#call(*args) ⇒ Object



47
48
49
50
# File 'lib/mandrill_event.rb', line 47

def call(*args)
  payload = args.last
  subscriber.call(payload)
end