Class: Flipper::Notifications::Webhooks::Webhook
- Inherits:
-
Object
- Object
- Flipper::Notifications::Webhooks::Webhook
- Includes:
- HTTParty
- Defined in:
- lib/flipper/notifications/webhooks/webhook.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#url ⇒ Object
readonly
Returns the value of attribute url.
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(url:) ⇒ Webhook
constructor
A new instance of Webhook.
- #notify(**_kwargs) ⇒ Object
- #serialized_attributes ⇒ Object
Constructor Details
#initialize(url:) ⇒ Webhook
Returns a new instance of Webhook.
16 17 18 |
# File 'lib/flipper/notifications/webhooks/webhook.rb', line 16 def initialize(url:) @url = url end |
Instance Attribute Details
#url ⇒ Object (readonly)
Returns the value of attribute url.
20 21 22 |
# File 'lib/flipper/notifications/webhooks/webhook.rb', line 20 def url @url end |
Instance Method Details
#==(other) ⇒ Object
30 31 32 |
# File 'lib/flipper/notifications/webhooks/webhook.rb', line 30 def ==(other) other.is_a?(self.class) && url == other.url end |
#notify(**_kwargs) ⇒ Object
22 23 24 |
# File 'lib/flipper/notifications/webhooks/webhook.rb', line 22 def notify(**_kwargs) raise "Implement #notify in your subclass" end |
#serialized_attributes ⇒ Object
26 27 28 |
# File 'lib/flipper/notifications/webhooks/webhook.rb', line 26 def serialized_attributes { url: url } end |