Class: SquareEvent::NotificationAdapter

Inherits:
Struct
  • Object
show all
Defined in:
lib/square_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



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

def subscriber
  @subscriber
end

Class Method Details

.call(callable) ⇒ Object



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

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

Instance Method Details

#call(*args) ⇒ Object



52
53
54
55
# File 'lib/square_event.rb', line 52

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