Class: Diffed::Html::OutputRow
- Inherits:
-
Object
- Object
- Diffed::Html::OutputRow
- Defined in:
- lib/formatters/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.
38 39 40 41 42 43 44 45 |
# File 'lib/formatters/html.rb', line 38 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.
36 37 38 |
# File 'lib/formatters/html.rb', line 36 def left @left end |
#right ⇒ Object (readonly)
Returns the value of attribute right.
36 37 38 |
# File 'lib/formatters/html.rb', line 36 def right @right end |
Instance Method Details
#text ⇒ Object
47 48 49 |
# File 'lib/formatters/html.rb', line 47 def text EscapeUtils.escape_html(@text, false) end |