Class: VCSToolkit::Conflict
- Inherits:
-
Object
- Object
- VCSToolkit::Conflict
- Defined in:
- lib/vcs_toolkit/conflict.rb
Instance Attribute Summary collapse
-
#diff_one ⇒ Object
readonly
Returns the value of attribute diff_one.
-
#diff_two ⇒ Object
readonly
Returns the value of attribute diff_two.
Instance Method Summary collapse
-
#adding? ⇒ Boolean
These methods are used for compatibility with ::Diff::LCS::Change so we can do this: ‘changes.any? { |change| change.adding? }` instead of `changes.any? { |change| (not change.is_a? VCSToolkit::Conflict) and change.adding? }`.
- #changed? ⇒ Boolean
- #conflict? ⇒ Boolean
- #deleting? ⇒ Boolean
- #finished_a? ⇒ Boolean
- #finished_b? ⇒ Boolean
-
#initialize(diff_one, diff_two) ⇒ Conflict
constructor
A new instance of Conflict.
- #unchanged? ⇒ Boolean
Constructor Details
#initialize(diff_one, diff_two) ⇒ Conflict
Returns a new instance of Conflict.
19 20 21 22 |
# File 'lib/vcs_toolkit/conflict.rb', line 19 def initialize(diff_one, diff_two) @diff_one = diff_one @diff_two = diff_two end |
Instance Attribute Details
#diff_one ⇒ Object (readonly)
Returns the value of attribute diff_one.
17 18 19 |
# File 'lib/vcs_toolkit/conflict.rb', line 17 def diff_one @diff_one end |
#diff_two ⇒ Object (readonly)
Returns the value of attribute diff_two.
17 18 19 |
# File 'lib/vcs_toolkit/conflict.rb', line 17 def diff_two @diff_two end |
Instance Method Details
#adding? ⇒ Boolean
These methods are used for compatibility with ::Diff::LCS::Change so we can do this: ‘changes.any? { |change| change.adding? }` instead of `changes.any? { |change| (not change.is_a? VCSToolkit::Conflict) and change.adding? }`
31 32 33 |
# File 'lib/vcs_toolkit/conflict.rb', line 31 def adding? false end |
#changed? ⇒ Boolean
43 44 45 |
# File 'lib/vcs_toolkit/conflict.rb', line 43 def changed? false end |
#conflict? ⇒ Boolean
24 25 26 |
# File 'lib/vcs_toolkit/conflict.rb', line 24 def conflict? true end |
#deleting? ⇒ Boolean
35 36 37 |
# File 'lib/vcs_toolkit/conflict.rb', line 35 def deleting? false end |
#finished_a? ⇒ Boolean
47 48 49 |
# File 'lib/vcs_toolkit/conflict.rb', line 47 def finished_a? false end |
#finished_b? ⇒ Boolean
51 52 53 |
# File 'lib/vcs_toolkit/conflict.rb', line 51 def finished_b? false end |
#unchanged? ⇒ Boolean
39 40 41 |
# File 'lib/vcs_toolkit/conflict.rb', line 39 def unchanged? false end |