Class: VCSToolkit::Conflict

Inherits:
Object
  • Object
show all
Defined in:
lib/vcs_toolkit/conflict.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_oneObject (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_twoObject (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? }`

Returns:

  • (Boolean)


31
32
33
# File 'lib/vcs_toolkit/conflict.rb', line 31

def adding?
  false
end

#changed?Boolean

Returns:

  • (Boolean)


43
44
45
# File 'lib/vcs_toolkit/conflict.rb', line 43

def changed?
  false
end

#conflict?Boolean

Returns:

  • (Boolean)


24
25
26
# File 'lib/vcs_toolkit/conflict.rb', line 24

def conflict?
  true
end

#deleting?Boolean

Returns:

  • (Boolean)


35
36
37
# File 'lib/vcs_toolkit/conflict.rb', line 35

def deleting?
  false
end

#finished_a?Boolean

Returns:

  • (Boolean)


47
48
49
# File 'lib/vcs_toolkit/conflict.rb', line 47

def finished_a?
  false
end

#finished_b?Boolean

Returns:

  • (Boolean)


51
52
53
# File 'lib/vcs_toolkit/conflict.rb', line 51

def finished_b?
  false
end

#unchanged?Boolean

Returns:

  • (Boolean)


39
40
41
# File 'lib/vcs_toolkit/conflict.rb', line 39

def unchanged?
  false
end