Class: Octopi::Branch
- Octopi::Base
- Octopi::Branch
Included Modules
Attributes
Instance Attributes
name | [RW] | public |
Sets the attribute name. |
---|---|---|---|
sha | [RW] | public |
Sets the attribute sha. |
Constants Inherited from Octopi::Base
Constructor Summary
public
initialize(*args)
Called when we ask for a resource. Arguments are passed in like [<name>, <sha>] TODO: Find out why args are doubly nested
[View source]
12 13 14 15 16 |
# File 'lib/octopi/branch.rb', line 12 def initialize(*args) args = args.flatten! self.name = args.first self.sha = args.last end |
Public Visibility
Public Class Method Summary
all(opts = {}) |
---|
Public Class Method Details
all
public
all(opts = {})
[View source]
22 23 24 25 26 27 28 |
# File 'lib/octopi/branch.rb', line 22 def self.all(opts={}) user, repo = gather_details(opts) self.validate_args(user => :user, repo => :repo) BranchSet.new(find_plural([user, repo, 'branches'], :resource)) do |i| { :name => i.first, :hash => i.last } end end |
Public Instance Method Details
to_s
public
to_s
[View source]
18 19 20 |
# File 'lib/octopi/branch.rb', line 18 def to_s name end |