Class: Merge

Inherits:
Object
  • Object
show all
Defined in:
lib/github_merge/merge.rb

Constant Summary collapse

VERSION =
"0.0.1"
MOVE_TREE_SCRIPT_PATH =
"#{Dir.pwd}/lib/github_merge"

Instance Method Summary collapse

Constructor Details

#initialize(file, options) ⇒ Merge

Returns a new instance of Merge.



11
12
13
14
15
16
17
# File 'lib/github_merge/merge.rb', line 11

def initialize(file, options)
  @file = file
  @options = options
  @config = YAML.load_file @file
  @local_merge = LocalMerge.new(@config, @options)
  @push_merge = PushMerge.new(@config, @options)
end

Instance Method Details

#local!Object



19
20
21
# File 'lib/github_merge/merge.rb', line 19

def local!
  @local_merge.merge!
end

#push!Object



23
24
25
26
# File 'lib/github_merge/merge.rb', line 23

def push!
  @local_merge.merge! unless @local_merge.merged?
  @push_merge.push!
end