Class: Tinybucket::Resource::Commit::BuildStatuses
- Defined in:
- lib/tinybucket/resource/commit/build_statuses.rb
Instance Method Summary collapse
-
#create(key, options) ⇒ Tinybucket::Model::BuildStatus
Create a build status for the commit.
-
#find(key, options = {}) ⇒ Tinybucket::Model::BuildStatus
Get the build status for the commit.
Methods inherited from Base
Constructor Details
This class inherits a constructor from Tinybucket::Resource::Commit::Base
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Tinybucket::Resource::Base
Instance Method Details
#create(key, options) ⇒ Tinybucket::Model::BuildStatus
Create a build status for the commit
29 30 31 32 33 34 |
# File 'lib/tinybucket/resource/commit/build_statuses.rb', line 29 def create(key, ) build_status_api.post(@commit.hash, key, ).tap do |m| m.revision = @commit.hash m.repo_keys = @commit.repo_keys end end |
#find(key, options = {}) ⇒ Tinybucket::Model::BuildStatus
Get the build status for the commit
17 18 19 20 21 22 |
# File 'lib/tinybucket/resource/commit/build_statuses.rb', line 17 def find(key, = {}) build_status_api.find(@commit.hash, key, ).tap do |m| m.revision = @commit.hash m.repo_keys = @commit.repo_keys end end |