Class: Monolith::Branch

Inherits:
Object
  • Object
show all
Defined in:
lib/monolith/branch.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#nameObject (readonly)

Returns the value of attribute name.



3
4
5
# File 'lib/monolith/branch.rb', line 3

def name
  @name
end

Instance Method Details

#pathObject



10
11
12
# File 'lib/monolith/branch.rb', line 10

def path
  [@repo.name, name].join("/")
end

#remoteObject



14
15
16
# File 'lib/monolith/branch.rb', line 14

def remote
  ["remotes", path].join("/")
end