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, = {}) @host ||= [:host] || "localhost" @port ||= [:port] || 2812 @ssl ||= [:ssl] || false @auth ||= [:auth] || false @username = [:username] @password = [:password] hash = rename_service_type(hash) if hash super(hash) end |