Class: BridgeCache::Webhooks::Request
- Inherits:
-
Object
- Object
- BridgeCache::Webhooks::Request
- Defined in:
- app/lib/bridge_cache/webhooks/request.rb
Instance Method Summary collapse
-
#initialize(payload) ⇒ Request
constructor
A new instance of Request.
- #process ⇒ Object
Constructor Details
#initialize(payload) ⇒ Request
Returns a new instance of Request.
4 5 6 |
# File 'app/lib/bridge_cache/webhooks/request.rb', line 4 def initialize(payload) @payload = payload end |
Instance Method Details
#process ⇒ Object
8 9 10 11 |
# File 'app/lib/bridge_cache/webhooks/request.rb', line 8 def process = BridgeCache::Webhooks::Message.new(@payload) .payload_class.public_send("webhook_#{@payload['trigger']}".to_sym, ) end |