Class: Coopy::HighlightPatchUnit

Inherits:
Object
  • Object
show all
Defined in:
lib/lib/coopy/highlight_patch_unit.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeHighlightPatchUnit

Returns a new instance of HighlightPatchUnit.



7
8
9
10
11
12
13
14
15
16
17
18
# File 'lib/lib/coopy/highlight_patch_unit.rb', line 7

def initialize
  @add = false
  @rem = false
  @update = false
  @source_row = -1
  @source_row_offset = 0
  @source_prev_row = -1
  @source_next_row = -1
  @dest_row = -1
  @patch_row = -1
  @code = ""
end

Instance Attribute Details

#addObject

Returns the value of attribute add.



20
21
22
# File 'lib/lib/coopy/highlight_patch_unit.rb', line 20

def add
  @add
end

#codeObject

Returns the value of attribute code.



23
24
25
# File 'lib/lib/coopy/highlight_patch_unit.rb', line 23

def code
  @code
end

#dest_rowObject

Returns the value of attribute dest_row.



28
29
30
# File 'lib/lib/coopy/highlight_patch_unit.rb', line 28

def dest_row
  @dest_row
end

#patch_rowObject

Returns the value of attribute patch_row.



29
30
31
# File 'lib/lib/coopy/highlight_patch_unit.rb', line 29

def patch_row
  @patch_row
end

#remObject

Returns the value of attribute rem.



21
22
23
# File 'lib/lib/coopy/highlight_patch_unit.rb', line 21

def rem
  @rem
end

#source_next_rowObject

Returns the value of attribute source_next_row.



27
28
29
# File 'lib/lib/coopy/highlight_patch_unit.rb', line 27

def source_next_row
  @source_next_row
end

#source_prev_rowObject

Returns the value of attribute source_prev_row.



26
27
28
# File 'lib/lib/coopy/highlight_patch_unit.rb', line 26

def source_prev_row
  @source_prev_row
end

#source_rowObject

Returns the value of attribute source_row.



24
25
26
# File 'lib/lib/coopy/highlight_patch_unit.rb', line 24

def source_row
  @source_row
end

#source_row_offsetObject

Returns the value of attribute source_row_offset.



25
26
27
# File 'lib/lib/coopy/highlight_patch_unit.rb', line 25

def source_row_offset
  @source_row_offset
end

#updateObject

Returns the value of attribute update.



22
23
24
# File 'lib/lib/coopy/highlight_patch_unit.rb', line 22

def update
  @update
end

Instance Method Details

#to_sObject



31
32
33
# File 'lib/lib/coopy/highlight_patch_unit.rb', line 31

def to_s 
  "(" + _hx_str(@code) + " patch " + _hx_str(@patch_row) + " source " + _hx_str(@source_prev_row) + ":" + _hx_str(@source_row) + ":" + _hx_str(@source_next_row) + "+" + _hx_str(@source_row_offset) + " dest " + _hx_str(@dest_row) + ")"
end