Method: Monit::Service#initialize

Defined in:
lib/monit/service.rb

#initialize(hash = nil, options = {}) ⇒ Service

Returns a new instance of Service.



7
8
9
10
11
12
13
14
15
16
17
# File 'lib/monit/service.rb', line 7

def initialize(hash = nil, options = {})
  @host     ||= options[:host] || "localhost"
  @port     ||= options[:port] || 2812
  @ssl      ||= options[:ssl]  || false
  @auth     ||= options[:auth] || false
  @username = options[:username]
  @password = options[:password]

  hash = rename_service_type(hash) if hash
  super(hash)
end