Class: PrettyDiff::BasicGenerator::LineGen
- Inherits:
-
AbstractGenerator
- Object
- AbstractGenerator
- PrettyDiff::BasicGenerator::LineGen
- Defined in:
- lib/pretty_diff/basic_generator.rb
Instance Method Summary collapse
Methods inherited from AbstractGenerator
Constructor Details
This class inherits a constructor from PrettyDiff::AbstractGenerator
Instance Method Details
#generate ⇒ Object
57 58 59 60 61 62 63 64 65 66 67 68 69 |
# File 'lib/pretty_diff/basic_generator.rb', line 57 def generate if line.added? content_tag(:span, :class => 'diff-line-add') do h(line.contents) end elsif line.deleted? content_tag(:span, :class => 'diff-line-del') do h(line.contents) end else h(line.contents) end end |