Class: Monolith::Application
Instance Attribute Summary collapse
Attributes inherited from Repository
#path, #url
Instance Method Summary
collapse
Methods inherited from Repository
#branches, #clone, #name, #prepare, #relative_path, #remote
Constructor Details
Returns a new instance of Application.
5
6
7
8
|
# File 'lib/monolith/application.rb', line 5
def initialize(config)
@config = config
super(config.path)
end
|
Instance Attribute Details
#config ⇒ Object
Returns the value of attribute config.
3
4
5
|
# File 'lib/monolith/application.rb', line 3
def config
@config
end
|
Instance Method Details
#branch?(name) ⇒ Boolean
10
11
12
|
# File 'lib/monolith/application.rb', line 10
def branch?(name)
config.branches.empty? || config.branches.include?(name)
end
|
#checkout_master ⇒ Object
14
15
16
|
# File 'lib/monolith/application.rb', line 14
def checkout_master
run("checkout master")
end
|
#merge(repo, branch) ⇒ Object
22
23
24
|
# File 'lib/monolith/application.rb', line 22
def merge(repo, branch)
BranchMerger.new(self, repo, branch).merge
end
|
#repositories ⇒ Object
26
27
28
|
# File 'lib/monolith/application.rb', line 26
def repositories
RepositoryFinder.new(self)
end
|