Class: Monit::Server
- Inherits:
-
Object
- Object
- Monit::Server
- Defined in:
- lib/monit/server.rb
Overview
The server section from the Monit XML
Instance Attribute Summary collapse
-
#controlfile ⇒ Object
readonly
Returns the value of attribute controlfile.
-
#httpd ⇒ Object
readonly
Returns the value of attribute httpd.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#incarnation ⇒ Object
readonly
Returns the value of attribute incarnation.
-
#localhostname ⇒ Object
readonly
Returns the value of attribute localhostname.
-
#poll ⇒ Object
readonly
Returns the value of attribute poll.
-
#startdelay ⇒ Object
readonly
Returns the value of attribute startdelay.
-
#uptime ⇒ Object
readonly
Returns the value of attribute uptime.
-
#version ⇒ Object
readonly
Returns the value of attribute version.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Server
constructor
A new instance of Server.
Constructor Details
#initialize(options = {}) ⇒ Server
Returns a new instance of Server.
6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/monit/server.rb', line 6 def initialize( = {}) @id = ["id"] @incarnation = ["incarnation"] @version = ["version"] @uptime = ["uptime"].to_i @poll = ["poll"].to_i @startdelay = ["startdelay"].to_i @localhostname = ["localhostname"] @controlfile = ["controlfile"] @httpd = ["httpd"].is_a?(HTTPD) ? ["httpd"] : HTTPD.new(["httpd"]) end |
Instance Attribute Details
#controlfile ⇒ Object (readonly)
Returns the value of attribute controlfile.
4 5 6 |
# File 'lib/monit/server.rb', line 4 def controlfile @controlfile end |
#httpd ⇒ Object (readonly)
Returns the value of attribute httpd.
4 5 6 |
# File 'lib/monit/server.rb', line 4 def httpd @httpd end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
4 5 6 |
# File 'lib/monit/server.rb', line 4 def id @id end |
#incarnation ⇒ Object (readonly)
Returns the value of attribute incarnation.
4 5 6 |
# File 'lib/monit/server.rb', line 4 def incarnation @incarnation end |
#localhostname ⇒ Object (readonly)
Returns the value of attribute localhostname.
4 5 6 |
# File 'lib/monit/server.rb', line 4 def localhostname @localhostname end |
#poll ⇒ Object (readonly)
Returns the value of attribute poll.
4 5 6 |
# File 'lib/monit/server.rb', line 4 def poll @poll end |
#startdelay ⇒ Object (readonly)
Returns the value of attribute startdelay.
4 5 6 |
# File 'lib/monit/server.rb', line 4 def startdelay @startdelay end |
#uptime ⇒ Object (readonly)
Returns the value of attribute uptime.
4 5 6 |
# File 'lib/monit/server.rb', line 4 def uptime @uptime end |
#version ⇒ Object (readonly)
Returns the value of attribute version.
4 5 6 |
# File 'lib/monit/server.rb', line 4 def version @version end |