Class: C0::Diff::Unit
- Inherits:
-
Struct
- Object
- Struct
- C0::Diff::Unit
- Defined in:
- lib/c0/diff.rb
Overview
One unit of a pattern: an anchor (new nil) or a substitution old␚␟new
(new the sub-unit of old).
Instance Attribute Summary collapse
-
#new ⇒ Object
Returns the value of attribute new.
-
#old ⇒ Object
Returns the value of attribute old.
Instance Method Summary collapse
Instance Attribute Details
#new ⇒ Object
Returns the value of attribute new
29 30 31 |
# File 'lib/c0/diff.rb', line 29 def new @new end |
#old ⇒ Object
Returns the value of attribute old
29 30 31 |
# File 'lib/c0/diff.rb', line 29 def old @old end |
Instance Method Details
#anchor? ⇒ Boolean
30 |
# File 'lib/c0/diff.rb', line 30 def anchor? = new.nil? |
#substitution? ⇒ Boolean
32 |
# File 'lib/c0/diff.rb', line 32 def substitution? = !new.nil? |