Sha256: e7f3be913005363249398c8185b9e085662e88d95cccd6febda1621564887893

Contents?: true

Size: 447 Bytes

Versions: 5

Compression:

Stored size: 447 Bytes

Contents

module Octopi
  class Branch < Base
    include Resource
    set_resource_name "branch", "branches"

    resource_path "/repos/show/:id"
    
    def self.find(user, repo)
      user = user.login if user.is_a? User
      repo = repo.name if repo.is_a? Repository
      self.validate_args(user => :user, repo => :repo)
      find_plural([user,repo,'branches'], :resource){
        |i| {:name => i.first, :hash => i.last }
      }
    end
  end
end

Version data entries

5 entries across 5 versions & 3 rubygems

Version Path
fcoury-octopi-0.0.11 lib/octopi/branch.rb
fcoury-octopi-0.0.8 lib/octopi/branch.rb
fcoury-octopi-0.0.9 lib/octopi/branch.rb
philnash-octopi-0.0.11 lib/octopi/branch.rb
octopi-0.0.9 lib/octopi/branch.rb