Class: Perchfall::Notify::Channel
- Inherits:
-
Object
- Object
- Perchfall::Notify::Channel
- Defined in:
- lib/perchfall/notify/channel.rb
Overview
Base interface for notification channels.
A channel is responsible for delivering a formatted message derived from a Perchfall::Report to an external destination (Slack, SMS, webhook, etc.).
Implement #deliver(report) in subclasses. Raise DeliveryError on failure.
Example:
class MyChannel < Perchfall::Notify::Channel
def deliver(report)
# send the report somewhere
end
end
Direct Known Subclasses
Instance Method Summary collapse
-
#deliver(report) ⇒ Object
Deliver a notification for the given report.
Instance Method Details
#deliver(report) ⇒ Object
Deliver a notification for the given report.
25 26 27 |
# File 'lib/perchfall/notify/channel.rb', line 25 def deliver(report) raise NotImplementedError, "#{self.class}#deliver is not implemented" end |