Class: Merge::Diff3::Conflict
- Inherits:
-
Struct
- Object
- Struct
- Merge::Diff3::Conflict
- Defined in:
- lib/merge/diff3.rb
Instance Attribute Summary collapse
-
#a_lines ⇒ Object
Returns the value of attribute a_lines.
-
#b_lines ⇒ Object
Returns the value of attribute b_lines.
-
#o_lines ⇒ Object
Returns the value of attribute o_lines.
Instance Method Summary collapse
Instance Attribute Details
#a_lines ⇒ Object
Returns the value of attribute a_lines
12 13 14 |
# File 'lib/merge/diff3.rb', line 12 def a_lines @a_lines end |
#b_lines ⇒ Object
Returns the value of attribute b_lines
12 13 14 |
# File 'lib/merge/diff3.rb', line 12 def b_lines @b_lines end |
#o_lines ⇒ Object
Returns the value of attribute o_lines
12 13 14 |
# File 'lib/merge/diff3.rb', line 12 def o_lines @o_lines end |
Instance Method Details
#separator(text, char, name = nil) ⇒ Object
23 24 25 26 27 |
# File 'lib/merge/diff3.rb', line 23 def separator(text, char, name = nil) text.concat(char * 7) text.concat(" #{ name }") if name text.concat("\n") end |
#to_s(a_name = nil, b_name = nil) ⇒ Object
13 14 15 16 17 18 19 20 21 |
# File 'lib/merge/diff3.rb', line 13 def to_s(a_name = nil, b_name = nil) text = "" separator(text, "<", a_name) a_lines.each { |line| text.concat(line) } separator(text, "=") b_lines.each { |line| text.concat(line) } separator(text, ">", b_name) text end |