Class: Watcher::Process

Inherits:
BasicWatcher show all
Defined in:
lib/informer/watcher/process.rb

Instance Attribute Summary

Attributes inherited from BasicWatcher

#message

Instance Method Summary collapse

Constructor Details

#initialize(process, options = {}) ⇒ Process

Returns a new instance of Process.



3
4
5
6
# File 'lib/informer/watcher/process.rb', line 3

def initialize(process, options = {})
  @process = process
  @handle = options[:handle] || @process
end

Instance Method Details

#reportObject



8
9
10
# File 'lib/informer/watcher/process.rb', line 8

def report
  "#{@handle} is #{running? ? '' : 'not '}running"
end