Class: Monolith::BranchMerger

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/monolith/branch_merger.rb

Instance Method Summary collapse

Constructor Details

#initialize(monolith, repo, branch) ⇒ BranchMerger

Returns a new instance of BranchMerger.



7
8
9
10
11
# File 'lib/monolith/branch_merger.rb', line 7

def initialize(monolith, repo, branch)
  @monolith = monolith
  @repo = repo
  @branch = branch
end

Instance Method Details

#mergeObject



13
14
15
16
17
18
19
# File 'lib/monolith/branch_merger.rb', line 13

def merge
  within_working_dir do
    checkout_branch
    fetch_and_pull_branch
    checkout_previous_branch
  end
end