Class: Tinybucket::Resource::Branches

Inherits:
Base
  • Object
show all
Defined in:
lib/tinybucket/resource/branches.rb

Instance Method Summary collapse

Constructor Details

#initialize(repo, options) ⇒ Branches

Returns a new instance of Branches.


6
7
8
9
# File 'lib/tinybucket/resource/branches.rb', line 6

def initialize(repo, options)
  @repo = repo
  @args = [options]
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Tinybucket::Resource::Base

Instance Method Details

#find(branch, options = {}) ⇒ Tinybucket::Model::Branch

Find the branch

Parameters:

  • branch (String)
  • options (Hash) (defaults to: {})

Returns:


16
17
18
19
20
# File 'lib/tinybucket/resource/branches.rb', line 16

def find(branch, options = {})
  branches_api.find(branch, options).tap do |m|
    inject_repo_keys(m, @repo.repo_keys)
  end
end