Class: Diffed::DiffHtml::OutputRow
- Inherits:
-
Object
- Object
- Diffed::DiffHtml::OutputRow
- Defined in:
- lib/formatters/diff_html.rb
Instance Attribute Summary collapse
-
#left ⇒ Object
readonly
Returns the value of attribute left.
-
#right ⇒ Object
readonly
Returns the value of attribute right.
Instance Method Summary collapse
-
#initialize(params = {}) ⇒ OutputRow
constructor
A new instance of OutputRow.
- #text ⇒ Object
Constructor Details
#initialize(params = {}) ⇒ OutputRow
Returns a new instance of OutputRow.
52 53 54 55 56 57 58 59 |
# File 'lib/formatters/diff_html.rb', line 52 def initialize(params = {}) if params[:code_line].nil? @left, @right, @text = params[:left], params[:right], params[:text] else line = params[:code_line] @left, @right, @text = line.left_line_num, line.right_line_num, line.text end end |
Instance Attribute Details
#left ⇒ Object (readonly)
Returns the value of attribute left.
50 51 52 |
# File 'lib/formatters/diff_html.rb', line 50 def left @left end |
#right ⇒ Object (readonly)
Returns the value of attribute right.
50 51 52 |
# File 'lib/formatters/diff_html.rb', line 50 def right @right end |
Instance Method Details
#text ⇒ Object
61 62 63 |
# File 'lib/formatters/diff_html.rb', line 61 def text EscapeUtils.escape_html(@text, false) end |