Class: Octopi::BranchSet
- Inherits:
-
Array
- Object
- Array
- Octopi::BranchSet
- Includes:
- Octopi
- Defined in:
- lib/octopi/branch_set.rb
Constant Summary
Constants included from Octopi
Instance Attribute Summary collapse
-
#repository ⇒ Object
Returns the value of attribute repository.
-
#user ⇒ Object
Returns the value of attribute user.
Instance Method Summary collapse
-
#find(name) ⇒ Object
Takes a name, returns a branch if it exists.
Methods included from Octopi
#authenticated, #authenticated_with
Instance Attribute Details
#repository ⇒ Object
Returns the value of attribute repository.
4 5 6 |
# File 'lib/octopi/branch_set.rb', line 4 def repository @repository end |
#user ⇒ Object
Returns the value of attribute user.
4 5 6 |
# File 'lib/octopi/branch_set.rb', line 4 def user @user end |
Instance Method Details
#find(name) ⇒ Object
Takes a name, returns a branch if it exists
6 7 8 9 10 |
# File 'lib/octopi/branch_set.rb', line 6 def find(name) branch = detect { |b| b.name == name } raise NotFound, Branch if branch.nil? branch end |