Class: Dcm::DiffViewer
Instance Method Summary collapse
-
#initialize(left, right) ⇒ DiffViewer
constructor
A new instance of DiffViewer.
- #to_s ⇒ Object
Constructor Details
#initialize(left, right) ⇒ DiffViewer
Returns a new instance of DiffViewer.
5 6 7 8 |
# File 'lib/diff_viewer.rb', line 5 def initialize(left, right) Diffy::Diff.default_format = :color @diff = Diffy::Diff.new(left, right) end |
Instance Method Details
#to_s ⇒ Object
10 11 12 |
# File 'lib/diff_viewer.rb', line 10 def to_s @diff.to_s + "\n" end |