Class: Monit::Service

Inherits:
OpenStruct
  • Object
show all
Defined in:
lib/monit/service.rb

Overview

The service section from the Monit XML. Inherits from OpenStruct.

Constant Summary collapse

TYPES =
{ 0 => "Filesystem", 1 => "Directory", 2 => "File", 3 => "Daemon", 4 => "Connection", 5 => "System" }

Instance Method Summary collapse

Constructor Details

#initialize(hash = nil) ⇒ Service

Returns a new instance of Service.



7
8
9
10
# File 'lib/monit/service.rb', line 7

def initialize(hash = nil)
  hash = rename_service_type(hash) if hash
  super(hash)
end