Class: Twterm::Event::Notification::AbstractNotification
- Defined in:
- lib/twterm/event/notification/abstract_notification.rb
Instance Attribute Summary collapse
-
#time ⇒ Object
readonly
Returns the value of attribute time.
Instance Method Summary collapse
- #color ⇒ Object
- #fields ⇒ Object
-
#initialize(message) ⇒ AbstractNotification
constructor
A new instance of AbstractNotification.
Methods included from Utils
Constructor Details
#initialize(message) ⇒ AbstractNotification
Returns a new instance of AbstractNotification.
9 10 11 12 13 |
# File 'lib/twterm/event/notification/abstract_notification.rb', line 9 def initialize() super(CGI.unescapeHTML()) @time = Time.now end |
Instance Attribute Details
#time ⇒ Object (readonly)
Returns the value of attribute time.
7 8 9 |
# File 'lib/twterm/event/notification/abstract_notification.rb', line 7 def time @time end |
Instance Method Details
#color ⇒ Object
21 22 23 |
# File 'lib/twterm/event/notification/abstract_notification.rb', line 21 def color raise NotImplementedError, 'color method must be overridden' end |
#fields ⇒ Object
15 16 17 18 19 |
# File 'lib/twterm/event/notification/abstract_notification.rb', line 15 def fields { message: String } end |