Class: DiffOutputTdiff
Overview
this is just a stub, not yet functional
Instance Method Summary
collapse
#apply_row
Methods inherited from DiffOutput
#apply_row, #end_diff, #to_string, #want_context
Instance Method Details
#begin_diff ⇒ Object
5
6
7
|
# File 'lib/coopy/diff_output_tdiff.rb', line 5
def begin_diff
puts "# tdiff version 0.3"
end
|
#row_context(rc) ⇒ Object
44
45
46
47
|
# File 'lib/coopy/diff_output_tdiff.rb', line 44
def row_context(rc)
print "* "
row_show(rc)
end
|
#row_delete(rc) ⇒ Object
30
31
32
33
|
# File 'lib/coopy/diff_output_tdiff.rb', line 30
def row_delete(rc)
print "- "
row_show(rc)
end
|
#row_insert(rc) ⇒ Object
25
26
27
28
|
# File 'lib/coopy/diff_output_tdiff.rb', line 25
def row_insert(rc)
print "+ "
row_show(rc)
end
|
#row_show(rc) ⇒ Object
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
# File 'lib/coopy/diff_output_tdiff.rb', line 9
def row_show(rc)
rc.active_columns.each do |col|
title = col[:title]
offset = col[:diff_offset]
print "|"
print title
print "="
print rc.cells[offset][:txt]
unless rc.cells[offset][:new_value].nil?
print "->"
print rc.cells[offset][:new_value]
end
end
puts "|"
end
|
#row_skip(rc) ⇒ Object
40
41
42
|
# File 'lib/coopy/diff_output_tdiff.rb', line 40
def row_skip(rc)
puts "* ||"
end
|
#row_update(rc) ⇒ Object
35
36
37
38
|
# File 'lib/coopy/diff_output_tdiff.rb', line 35
def row_update(rc)
print "= "
row_show(rc)
end
|