Class: Octopi::Branch
- Includes:
- Resource
- Defined in:
- lib/octopi/branch.rb
Constant Summary
Constants inherited from Base
Instance Attribute Summary
Attributes inherited from Base
Class Method Summary collapse
Methods included from Resource
Methods inherited from Base
Constructor Details
This class inherits a constructor from Octopi::Base
Class Method Details
.find(user, repo, api = ANONYMOUS_API) ⇒ Object
8 9 10 11 12 13 14 15 16 |
# File 'lib/octopi/branch.rb', line 8 def self.find(user, repo, api=ANONYMOUS_API) user = user.login if user.is_a? User repo = repo.name if repo.is_a? Repository self.validate_args(user => :user, repo => :repo) api = ANONYMOUS_API if repo.is_a?(Repository) && !repo.private find_plural([user,repo,'branches'], :resource, api){ |i| {:name => i.first, :hash => i.last } } end |