Class: Simulacrum::Diff

Inherits:
Object
  • Object
show all
Defined in:
lib/simulacrum/diff.rb

Direct Known Subclasses

RmagicDiff

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(a_path, b_path) ⇒ Diff

Returns a new instance of Diff.



5
6
7
8
9
10
# File 'lib/simulacrum/diff.rb', line 5

def initialize(a_path, b_path)
  @a_path = a_path
  @b_path = b_path

  compare
end

Instance Attribute Details

#a_pathObject

Returns the value of attribute a_path.



3
4
5
# File 'lib/simulacrum/diff.rb', line 3

def a_path
  @a_path
end

#b_pathObject

Returns the value of attribute b_path.



3
4
5
# File 'lib/simulacrum/diff.rb', line 3

def b_path
  @b_path
end

#deltaObject

Returns the value of attribute delta.



3
4
5
# File 'lib/simulacrum/diff.rb', line 3

def delta
  @delta
end

#imageObject

Returns the value of attribute image.



3
4
5
# File 'lib/simulacrum/diff.rb', line 3

def image
  @image
end

Instance Method Details

#save(path) ⇒ Object



12
13
14
# File 'lib/simulacrum/diff.rb', line 12

def save(path)
  @image.write(path)
end