Class: Dcm::DiffViewer

Inherits:
Object show all
Defined in:
lib/diff_viewer.rb

Instance Method Summary collapse

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_sObject



10
11
12
# File 'lib/diff_viewer.rb', line 10

def to_s
  @diff.to_s + "\n"
end