Class: Bamboo::Client::Remote::Build
- Inherits:
-
Object
- Object
- Bamboo::Client::Remote::Build
- Defined in:
- lib/bamboo-client/remote.rb
Overview
types
Instance Method Summary collapse
- #enabled? ⇒ Boolean
- #execute ⇒ Object
-
#initialize(doc, client) ⇒ Build
constructor
A new instance of Build.
- #key ⇒ Object
- #latest_results ⇒ Object
- #name ⇒ Object
- #recently_completed_results ⇒ Object
- #update_and_build ⇒ Object
Constructor Details
#initialize(doc, client) ⇒ Build
Returns a new instance of Build.
94 95 96 97 |
# File 'lib/bamboo-client/remote.rb', line 94 def initialize(doc, client) @doc = doc @client = client end |
Instance Method Details
#enabled? ⇒ Boolean
99 100 101 |
# File 'lib/bamboo-client/remote.rb', line 99 def enabled? @doc['enabled'] == 'true' end |
#execute ⇒ Object
115 116 117 |
# File 'lib/bamboo-client/remote.rb', line 115 def execute @client.execute_build(key) end |
#key ⇒ Object
107 108 109 |
# File 'lib/bamboo-client/remote.rb', line 107 def key @doc.css("key").text end |
#latest_results ⇒ Object
111 112 113 |
# File 'lib/bamboo-client/remote.rb', line 111 def latest_results @client.latest_build_results key end |
#name ⇒ Object
103 104 105 |
# File 'lib/bamboo-client/remote.rb', line 103 def name @doc.css("name").text end |
#recently_completed_results ⇒ Object
123 124 125 |
# File 'lib/bamboo-client/remote.rb', line 123 def recently_completed_results @client.recently_completed_results_for_build(key) end |
#update_and_build ⇒ Object
119 120 121 |
# File 'lib/bamboo-client/remote.rb', line 119 def update_and_build @client.update_and_build(key) end |