Class: Codeship::Builds
- Inherits:
-
Object
- Object
- Codeship::Builds
- Defined in:
- lib/codeship/builds.rb
Instance Method Summary collapse
-
#initialize(api_key = nil) ⇒ Builds
constructor
A new instance of Builds.
- #restart(id) ⇒ Object
Methods included from Response
Methods included from Request
Constructor Details
#initialize(api_key = nil) ⇒ Builds
Returns a new instance of Builds.
10 11 12 |
# File 'lib/codeship/builds.rb', line 10 def initialize api_key = nil @api_key = api_key end |
Instance Method Details
#restart(id) ⇒ Object
14 15 16 17 18 19 20 |
# File 'lib/codeship/builds.rb', line 14 def restart id raise ArgumentError, 'You need to set API key' if !@api_key @build_id = id @action = 'restart' resp = http_request.request_post builds_url, '' handle(resp) end |