Class: TimerCli::Notifier
- Inherits:
-
Object
- Object
- TimerCli::Notifier
- Defined in:
- lib/timer_cli/notifier.rb
Instance Method Summary collapse
-
#initialize(sec) ⇒ Notifier
constructor
A new instance of Notifier.
- #notify ⇒ Object
Constructor Details
#initialize(sec) ⇒ Notifier
5 6 7 |
# File 'lib/timer_cli/notifier.rb', line 5 def initialize(sec) @sec = sec end |
Instance Method Details
#notify ⇒ Object
9 10 11 12 13 |
# File 'lib/timer_cli/notifier.rb', line 9 def notify growl = Growl.new('localhost', 'Timer') growl.add_notification('timer') growl.notify('timer', 'Timer', "#{@sec} second(s) have passed.") end |