Class: Redmine::Diff
- Inherits:
-
Object
- Object
- Redmine::Diff
- Defined in:
- lib/redmine/unified_diff.rb
Overview
A line of diff
Instance Attribute Summary collapse
-
#line_left ⇒ Object
Returns the value of attribute line_left.
-
#line_right ⇒ Object
Returns the value of attribute line_right.
-
#nb_line_left ⇒ Object
Returns the value of attribute nb_line_left.
-
#nb_line_right ⇒ Object
Returns the value of attribute nb_line_right.
-
#offsets ⇒ Object
Returns the value of attribute offsets.
-
#type_diff_left ⇒ Object
Returns the value of attribute type_diff_left.
-
#type_diff_right ⇒ Object
Returns the value of attribute type_diff_right.
Instance Method Summary collapse
- #html_line ⇒ Object
- #html_line_left ⇒ Object
- #html_line_right ⇒ Object
-
#initialize ⇒ Diff
constructor
A new instance of Diff.
- #inspect ⇒ Object
- #line ⇒ Object
- #type_diff ⇒ Object
Constructor Details
#initialize ⇒ Diff
Returns a new instance of Diff
223 224 225 226 227 228 229 230 |
# File 'lib/redmine/unified_diff.rb', line 223 def initialize() self.nb_line_left = '' self.nb_line_right = '' self.line_left = '' self.line_right = '' self.type_diff_right = '' self.type_diff_left = '' end |
Instance Attribute Details
#line_left ⇒ Object
Returns the value of attribute line_left
216 217 218 |
# File 'lib/redmine/unified_diff.rb', line 216 def line_left @line_left end |
#line_right ⇒ Object
Returns the value of attribute line_right
218 219 220 |
# File 'lib/redmine/unified_diff.rb', line 218 def line_right @line_right end |
#nb_line_left ⇒ Object
Returns the value of attribute nb_line_left
215 216 217 |
# File 'lib/redmine/unified_diff.rb', line 215 def nb_line_left @nb_line_left end |
#nb_line_right ⇒ Object
Returns the value of attribute nb_line_right
217 218 219 |
# File 'lib/redmine/unified_diff.rb', line 217 def nb_line_right @nb_line_right end |
#offsets ⇒ Object
Returns the value of attribute offsets
221 222 223 |
# File 'lib/redmine/unified_diff.rb', line 221 def offsets @offsets end |
#type_diff_left ⇒ Object
Returns the value of attribute type_diff_left
220 221 222 |
# File 'lib/redmine/unified_diff.rb', line 220 def type_diff_left @type_diff_left end |
#type_diff_right ⇒ Object
Returns the value of attribute type_diff_right
219 220 221 |
# File 'lib/redmine/unified_diff.rb', line 219 def type_diff_right @type_diff_right end |
Instance Method Details
#html_line ⇒ Object
248 249 250 |
# File 'lib/redmine/unified_diff.rb', line 248 def html_line line_to_html(line, offsets) end |
#html_line_left ⇒ Object
240 241 242 |
# File 'lib/redmine/unified_diff.rb', line 240 def html_line_left line_to_html(line_left, offsets) end |
#html_line_right ⇒ Object
244 245 246 |
# File 'lib/redmine/unified_diff.rb', line 244 def html_line_right line_to_html(line_right, offsets) end |
#inspect ⇒ Object
252 253 254 255 256 257 258 |
# File 'lib/redmine/unified_diff.rb', line 252 def inspect puts '### Start Line Diff ###' puts self.nb_line_left puts self.line_left puts self.nb_line_right puts self.line_right end |
#line ⇒ Object
236 237 238 |
# File 'lib/redmine/unified_diff.rb', line 236 def line type_diff_right == 'diff_in' ? line_right : line_left end |
#type_diff ⇒ Object
232 233 234 |
# File 'lib/redmine/unified_diff.rb', line 232 def type_diff type_diff_right == 'diff_in' ? type_diff_right : type_diff_left end |