Class: Monolith::Branch
- Inherits:
-
Object
- Object
- Monolith::Branch
- Defined in:
- lib/monolith/branch.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(repo, name) ⇒ Branch
constructor
A new instance of Branch.
- #path ⇒ Object
- #remote ⇒ Object
Constructor Details
#initialize(repo, name) ⇒ Branch
5 6 7 8 |
# File 'lib/monolith/branch.rb', line 5 def initialize(repo, name) @repo = repo @name = name end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
3 4 5 |
# File 'lib/monolith/branch.rb', line 3 def name @name end |
Instance Method Details
#path ⇒ Object
10 11 12 |
# File 'lib/monolith/branch.rb', line 10 def path [@repo.name, name].join("/") end |
#remote ⇒ Object
14 15 16 |
# File 'lib/monolith/branch.rb', line 14 def remote ["remotes", path].join("/") end |