Class: ThymeUbuntuNotification
- Inherits:
-
Object
- Object
- ThymeUbuntuNotification
- Defined in:
- lib/thyme_ubuntu_notification.rb,
lib/thyme_ubuntu_notification/version.rb
Constant Summary collapse
- VERSION =
"0.1.0"
Instance Attribute Summary collapse
-
#end_text ⇒ Object
readonly
Returns the value of attribute end_text.
-
#start_text ⇒ Object
readonly
Returns the value of attribute start_text.
Instance Method Summary collapse
- #after(seconds_left) ⇒ Object
- #before ⇒ Object
-
#initialize(thyme, options = {}) ⇒ ThymeUbuntuNotification
constructor
A new instance of ThymeUbuntuNotification.
Constructor Details
#initialize(thyme, options = {}) ⇒ ThymeUbuntuNotification
Returns a new instance of ThymeUbuntuNotification.
6 7 8 9 |
# File 'lib/thyme_ubuntu_notification.rb', line 6 def initialize(thyme, ={}) @end_text = .fetch(:end_text, 'Pomodoro Ended') @start_text = .fetch(:start_text, 'Pomodoro Started') end |
Instance Attribute Details
#end_text ⇒ Object (readonly)
Returns the value of attribute end_text.
4 5 6 |
# File 'lib/thyme_ubuntu_notification.rb', line 4 def end_text @end_text end |
#start_text ⇒ Object (readonly)
Returns the value of attribute start_text.
4 5 6 |
# File 'lib/thyme_ubuntu_notification.rb', line 4 def start_text @start_text end |
Instance Method Details
#after(seconds_left) ⇒ Object
15 16 17 |
# File 'lib/thyme_ubuntu_notification.rb', line 15 def after(seconds_left) system('notify-send', end_text) end |
#before ⇒ Object
11 12 13 |
# File 'lib/thyme_ubuntu_notification.rb', line 11 def before system('notify-send', start_text) end |