Class: Merge::Inputs
- Inherits:
-
Object
- Object
- Merge::Inputs
- Defined in:
- lib/merge/inputs.rb
Constant Summary collapse
- ATTRS =
[ :left_name, :right_name, :left_oid, :right_oid, :base_oids ]
Instance Method Summary collapse
- #already_merged? ⇒ Boolean
- #fast_forward? ⇒ Boolean
-
#initialize(repository, left_name, right_name) ⇒ Inputs
constructor
A new instance of Inputs.
Constructor Details
#initialize(repository, left_name, right_name) ⇒ Inputs
Returns a new instance of Inputs.
13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/merge/inputs.rb', line 13 def initialize(repository, left_name, right_name) @repo = repository @left_name = left_name @right_name = right_name @left_oid = resolve_rev(@left_name) @right_oid = resolve_rev(@right_name) common = Bases.new(@repo.database, @left_oid, @right_oid) @base_oids = common.find end |
Instance Method Details
#already_merged? ⇒ Boolean
25 26 27 |
# File 'lib/merge/inputs.rb', line 25 def already_merged? @base_oids == [@right_oid] end |
#fast_forward? ⇒ Boolean
29 30 31 |
# File 'lib/merge/inputs.rb', line 29 def fast_forward? @base_oids == [@left_oid] end |