Class: Murakumo::ActivityCheckNotifier
- Inherits:
-
Object
- Object
- Murakumo::ActivityCheckNotifier
- Defined in:
- lib/srv/murakumo_activity_check_notifier.rb
Instance Method Summary collapse
-
#initialize(address, name, logger, options) ⇒ ActivityCheckNotifier
constructor
A new instance of ActivityCheckNotifier.
- #notify_active ⇒ Object
- #notify_inactive ⇒ Object
Constructor Details
#initialize(address, name, logger, options) ⇒ ActivityCheckNotifier
Returns a new instance of ActivityCheckNotifier.
8 9 10 11 12 13 14 15 16 17 |
# File 'lib/srv/murakumo_activity_check_notifier.rb', line 8 def initialize(address, name, logger, ) @address = address @name = name @logger = logger @args = [:args] @sender = [:sender] @recipients = [:recipients] @open_timeout = [:open_timeout] @read_timeout = [:read_timeout] end |
Instance Method Details
#notify_active ⇒ Object
19 20 21 |
# File 'lib/srv/murakumo_activity_check_notifier.rb', line 19 def notify_active notify('active', "#{@name} became active.") end |
#notify_inactive ⇒ Object
23 24 25 |
# File 'lib/srv/murakumo_activity_check_notifier.rb', line 23 def notify_inactive notify('inactive', "#{@name} became inactive. Zzz...") end |