Class: Simulacrum::Diff
- Inherits:
-
Object
- Object
- Simulacrum::Diff
- Defined in:
- lib/simulacrum/diff.rb
Overview
Base class for implementing diffing strategies
Direct Known Subclasses
Instance Attribute Summary collapse
-
#a_path ⇒ Object
Returns the value of attribute a_path.
-
#b_path ⇒ Object
Returns the value of attribute b_path.
-
#delta ⇒ Object
Returns the value of attribute delta.
-
#image ⇒ Object
Returns the value of attribute image.
Instance Method Summary collapse
-
#initialize(a_path, b_path) ⇒ Diff
constructor
A new instance of Diff.
- #save(path) ⇒ Object
Constructor Details
#initialize(a_path, b_path) ⇒ Diff
Returns a new instance of Diff.
7 8 9 10 11 12 |
# File 'lib/simulacrum/diff.rb', line 7 def initialize(a_path, b_path) @a_path = a_path @b_path = b_path compare end |
Instance Attribute Details
#a_path ⇒ Object
Returns the value of attribute a_path.
5 6 7 |
# File 'lib/simulacrum/diff.rb', line 5 def a_path @a_path end |
#b_path ⇒ Object
Returns the value of attribute b_path.
5 6 7 |
# File 'lib/simulacrum/diff.rb', line 5 def b_path @b_path end |
#delta ⇒ Object
Returns the value of attribute delta.
5 6 7 |
# File 'lib/simulacrum/diff.rb', line 5 def delta @delta end |
#image ⇒ Object
Returns the value of attribute image.
5 6 7 |
# File 'lib/simulacrum/diff.rb', line 5 def image @image end |
Instance Method Details
#save(path) ⇒ Object
14 15 16 |
# File 'lib/simulacrum/diff.rb', line 14 def save(path) @image.write(path) end |