Class: Tinybucket::Resource::Commits
- Defined in:
- lib/tinybucket/resource/commits.rb
Instance Method Summary collapse
-
#branch(name, options = {}) ⇒ Tinybucket::Iterator
Returns the commits for a specific branch.
-
#find(revision, options = {}) ⇒ Tinybucket::Model::Commit
Find the commit.
-
#initialize(repo, options) ⇒ Commits
constructor
A new instance of Commits.
Constructor Details
#initialize(repo, options) ⇒ Commits
Returns a new instance of Commits.
6 7 8 9 |
# File 'lib/tinybucket/resource/commits.rb', line 6 def initialize(repo, ) @repo = repo @args = [] end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Tinybucket::Resource::Base
Instance Method Details
#branch(name, options = {}) ⇒ Tinybucket::Iterator
Returns the commits for a specific branch
27 28 29 30 31 |
# File 'lib/tinybucket/resource/commits.rb', line 27 def branch(name, = {}) create_enumerator(commits_api, :branch, name, ) do |m| inject_repo_keys(m, @repo.repo_keys) end end |
#find(revision, options = {}) ⇒ Tinybucket::Model::Commit
Find the commit
16 17 18 19 20 |
# File 'lib/tinybucket/resource/commits.rb', line 16 def find(revision, = {}) commits_api.find(revision, ).tap do |m| inject_repo_keys(m, @repo.repo_keys) end end |