Class: EventSubEvents::NotificationAdapter

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



56
57
58
# File 'lib/event_sub_events.rb', line 56

def subscriber
  @subscriber
end

Class Method Details

.call(callable) ⇒ Object



57
58
59
# File 'lib/event_sub_events.rb', line 57

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

Instance Method Details

#call(*args) ⇒ Object



61
62
63
64
# File 'lib/event_sub_events.rb', line 61

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