class Tinybucket::Resource::Branches

Public Class Methods

new(repo, options) click to toggle source
# File lib/tinybucket/resource/branches.rb, line 6
def initialize(repo, options)
  @repo = repo
  @args = [options]
end

Public Instance Methods

find(branch, options = {}) click to toggle source

Find the branch

@param branch [String] @param options [Hash] @return [Tinybucket::Model::Branch]

# 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

Private Instance Methods

branches_api() click to toggle source
# File lib/tinybucket/resource/branches.rb, line 24
def branches_api
  create_api('Branches', @repo.repo_keys)
end
enumerator() click to toggle source
# File lib/tinybucket/resource/branches.rb, line 28
def enumerator
  create_enumerator(branches_api, :list, *@args) do |m|
    inject_repo_keys(m, @repo.repo_keys)
  end
end