Class: Diffed::Diff::OutputRow
- Inherits:
-
Object
- Object
- Diffed::Diff::OutputRow
- Defined in:
- lib/diffed.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.
92 93 94 95 96 97 98 99 |
# File 'lib/diffed.rb', line 92 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.
90 91 92 |
# File 'lib/diffed.rb', line 90 def left @left end |
#right ⇒ Object (readonly)
Returns the value of attribute right.
90 91 92 |
# File 'lib/diffed.rb', line 90 def right @right end |
Instance Method Details
#text ⇒ Object
101 102 103 |
# File 'lib/diffed.rb', line 101 def text EscapeUtils.escape_html(@text, false) end |