Class: OmniHooks::Strategy::NotificationAdapter

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



160
161
162
# File 'lib/omnihooks/strategy.rb', line 160

def subscriber
  @subscriber
end

Class Method Details

.call(callable) ⇒ Object



161
162
163
# File 'lib/omnihooks/strategy.rb', line 161

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

Instance Method Details

#call(*args) ⇒ Object



165
166
167
168
# File 'lib/omnihooks/strategy.rb', line 165

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