Class: Twterm::Event::Notification::AbstractNotification Abstract
- Inherits:
-
AbstractEvent
- Object
- AbstractEvent
- Twterm::Event::Notification::AbstractNotification
- Defined in:
- lib/twterm/event/notification/abstract_notification.rb
Overview
This class is abstract.
Instance Method Summary collapse
-
#body ⇒ String
abstract
Notification body.
-
#fallback ⇒ String
A fallback text.
-
#title ⇒ String
abstract
Notification title.
-
#url ⇒ String?
Notification URL.
Methods inherited from AbstractEvent
Methods included from Utils
Constructor Details
This class inherits a constructor from Twterm::Event::AbstractEvent
Instance Method Details
#body ⇒ String
This method is abstract.
Returns notification body.
10 11 12 |
# File 'lib/twterm/event/notification/abstract_notification.rb', line 10 def body raise NotImplementedError, '`body` must be implemented' end |
#fallback ⇒ String
Returns a fallback text.
15 16 17 |
# File 'lib/twterm/event/notification/abstract_notification.rb', line 15 def fallback "#{title}: #{body}" end |
#title ⇒ String
This method is abstract.
Returns notification title.
21 22 23 |
# File 'lib/twterm/event/notification/abstract_notification.rb', line 21 def title raise NotImplementedError, '`fallback` must be implemented' end |
#url ⇒ String?
Returns notification URL.
26 27 28 |
# File 'lib/twterm/event/notification/abstract_notification.rb', line 26 def url nil end |