Class: Procmon::ProcessNotification

Inherits:
Object
  • Object
show all
Defined in:
lib/procmon/process_notification.rb

Instance Method Summary collapse

Constructor Details

#initialize(process, check) ⇒ ProcessNotification

Returns a new instance of ProcessNotification.



3
4
5
6
7
8
9
# File 'lib/procmon/process_notification.rb', line 3

def initialize(process, check)
  hostname = `hostname`.strip
  @msg = ""
  @msg += "Hostname: #{hostname}" + "\n"
  @msg += "Process: #{process.name}" + "\n"
  @msg += "Description: #{check.description}"
end

Instance Method Details

#to_sObject



10
11
12
# File 'lib/procmon/process_notification.rb', line 10

def to_s
  @msg
end