Class: Bark::Status
- Inherits:
-
Object
- Object
- Bark::Status
- Defined in:
- lib/bark/status.rb
Overview
The Status class hits the Status Monit API endpoint
Instance Method Summary collapse
-
#current ⇒ String
Retrieves the current status of Monit.
-
#initialize(client) ⇒ Status
constructor
A new instance of Status.
Constructor Details
#initialize(client) ⇒ Status
Returns a new instance of Status.
5 6 7 |
# File 'lib/bark/status.rb', line 5 def initialize(client) @client = client end |
Instance Method Details
#current ⇒ String
Retrieves the current status of Monit. Note: This is the top level API object
12 13 14 15 |
# File 'lib/bark/status.rb', line 12 def current response = @client.get('_status', format: 'xml') validate response end |