Class: JenkinsApi::Client::Root
- Inherits:
-
Object
- Object
- JenkinsApi::Client::Root
- Includes:
- UriHelper
- Defined in:
- lib/improved_jenkins_client/root.rb
Overview
This class communicates with Jenkins API at the root address to obtain details on the page displayed to users on the Jenkins’ ‘homepage,’ and other data items such as quietingDown
Instance Method Summary collapse
-
#description ⇒ String
Get message displayed to users on the homepage.
-
#initialize(client) ⇒ Root
constructor
Initializes a new root object.
-
#quieting_down? ⇒ Boolean
Check if Jenkins is in shutdown mode.
-
#to_s ⇒ Object
Return a string representation of the object.
Methods included from UriHelper
Constructor Details
#initialize(client) ⇒ Root
Initializes a new root object
37 38 39 40 |
# File 'lib/improved_jenkins_client/root.rb', line 37 def initialize(client) @client = client @logger = @client.logger end |
Instance Method Details
#description ⇒ String
Get message displayed to users on the homepage
61 62 63 64 |
# File 'lib/improved_jenkins_client/root.rb', line 61 def description response_json = @client.api_get_request('', 'tree=description') response_json['description'] end |
#quieting_down? ⇒ Boolean
Check if Jenkins is in shutdown mode
52 53 54 55 |
# File 'lib/improved_jenkins_client/root.rb', line 52 def quieting_down? response_json = @client.api_get_request('', 'tree=quietingDown') response_json['quietingDown'] end |
#to_s ⇒ Object
Return a string representation of the object
44 45 46 |
# File 'lib/improved_jenkins_client/root.rb', line 44 def to_s "#<JenkinsApi::Client::Root>" end |