Class: Notifications::Notification
- Inherits:
-
Object
- Object
- Notifications::Notification
- Defined in:
- lib/notifications.rb
Instance Attribute Summary collapse
-
#actions ⇒ Object
Returns the value of attribute actions.
-
#appname ⇒ Object
Returns the value of attribute appname.
-
#body ⇒ Object
Returns the value of attribute body.
-
#hints ⇒ Object
Returns the value of attribute hints.
-
#icon ⇒ Object
Returns the value of attribute icon.
-
#id ⇒ Object
Returns the value of attribute id.
-
#summary ⇒ Object
Returns the value of attribute summary.
-
#timeout ⇒ Object
Returns the value of attribute timeout.
Instance Method Summary collapse
-
#initialize(icon: '', body: '', summary: '', hints: {}, timeout: -1,, appname:) ⇒ Notification
constructor
A new instance of Notification.
- #register_action(action:) ⇒ Object
Constructor Details
#initialize(icon: '', body: '', summary: '', hints: {}, timeout: -1,, appname:) ⇒ Notification
Returns a new instance of Notification.
174 175 176 177 178 179 180 181 182 183 |
# File 'lib/notifications.rb', line 174 def initialize(icon: '', body: '', summary: '', hints: {}, timeout: -1, appname:) @actions = ActionList.new @icon = icon @body = body @summary = summary @hints = hints @timeout = timeout @id = nil @appname = appname end |
Instance Attribute Details
#actions ⇒ Object
Returns the value of attribute actions.
172 173 174 |
# File 'lib/notifications.rb', line 172 def actions @actions end |
#appname ⇒ Object
Returns the value of attribute appname.
172 173 174 |
# File 'lib/notifications.rb', line 172 def appname @appname end |
#body ⇒ Object
Returns the value of attribute body.
172 173 174 |
# File 'lib/notifications.rb', line 172 def body @body end |
#hints ⇒ Object
Returns the value of attribute hints.
172 173 174 |
# File 'lib/notifications.rb', line 172 def hints @hints end |
#icon ⇒ Object
Returns the value of attribute icon.
172 173 174 |
# File 'lib/notifications.rb', line 172 def icon @icon end |
#id ⇒ Object
Returns the value of attribute id.
172 173 174 |
# File 'lib/notifications.rb', line 172 def id @id end |
#summary ⇒ Object
Returns the value of attribute summary.
172 173 174 |
# File 'lib/notifications.rb', line 172 def summary @summary end |
#timeout ⇒ Object
Returns the value of attribute timeout.
172 173 174 |
# File 'lib/notifications.rb', line 172 def timeout @timeout end |
Instance Method Details
#register_action(action:) ⇒ Object
185 186 187 |
# File 'lib/notifications.rb', line 185 def register_action(action:) @actions << action end |