Class: Merge
- Inherits:
-
Object
- Object
- Merge
- 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
-
#initialize(file, options) ⇒ Merge
constructor
A new instance of Merge.
- #local! ⇒ Object
- #push! ⇒ Object
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, ) @file = file @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 |