Class: Bamboo::Client::Remote::Build

Inherits:
Object
  • Object
show all
Defined in:
lib/bamboo-client/remote.rb

Overview

types

Instance Method Summary collapse

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

Returns:

  • (Boolean)


99
100
101
# File 'lib/bamboo-client/remote.rb', line 99

def enabled?
  @doc['enabled'] == 'true'
end

#executeObject



115
116
117
# File 'lib/bamboo-client/remote.rb', line 115

def execute
  @client.execute_build(key)
end

#keyObject



107
108
109
# File 'lib/bamboo-client/remote.rb', line 107

def key
  @doc.css("key").text
end

#latest_resultsObject



111
112
113
# File 'lib/bamboo-client/remote.rb', line 111

def latest_results
  @client.latest_build_results key
end

#nameObject



103
104
105
# File 'lib/bamboo-client/remote.rb', line 103

def name
  @doc.css("name").text
end

#recently_completed_resultsObject



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_buildObject



119
120
121
# File 'lib/bamboo-client/remote.rb', line 119

def update_and_build
  @client.update_and_build(key)
end