Class: DiffRenderer::ParagraphBlock::ChangedParagraph::HtmlText
- Inherits:
-
Object
- Object
- DiffRenderer::ParagraphBlock::ChangedParagraph::HtmlText
- Defined in:
- lib/diffrenderer/paragraph_block.rb
Defined Under Namespace
Classes: HtmlSpan
Instance Method Summary collapse
-
#initialize(context_change) ⇒ HtmlText
constructor
A new instance of HtmlText.
- #to_s ⇒ Object
Constructor Details
#initialize(context_change) ⇒ HtmlText
Returns a new instance of HtmlText.
93 94 95 |
# File 'lib/diffrenderer/paragraph_block.rb', line 93 def initialize(context_change) @context_change = context_change end |
Instance Method Details
#to_s ⇒ Object
97 98 99 100 101 102 103 104 |
# File 'lib/diffrenderer/paragraph_block.rb', line 97 def to_s case @context_change.action when "=" then old_text when "-" then removed_span when "+" then added_span when "!" then "#{removed_span} #{added_span}" end.to_s end |