Class: Procmon::ProcessNotification
- Inherits:
-
Object
- Object
- Procmon::ProcessNotification
- Defined in:
- lib/procmon/process_notification.rb
Instance Method Summary collapse
-
#initialize(process, check) ⇒ ProcessNotification
constructor
A new instance of ProcessNotification.
- #to_s ⇒ Object
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_s ⇒ Object
10 11 12 |
# File 'lib/procmon/process_notification.rb', line 10 def to_s @msg end |