Module: Lookout::Diff::Operation
- Included in:
- Lookout::Diff::Operations::Delete, Lookout::Diff::Operations::Equal, Lookout::Diff::Operations::Insert, Lookout::Diff::Operations::Replace
- Defined in:
- lib/lookout/diff/operation.rb
Instance Attribute Summary collapse
-
#from ⇒ Object
readonly
Returns the value of attribute from.
-
#to ⇒ Object
readonly
Returns the value of attribute to.
Instance Method Summary collapse
- #<<(size) ⇒ Object
- #==(other) ⇒ Object
- #>>(size) ⇒ Object
- #foldable?(window) ⇒ Boolean
- #initialize(from, to) ⇒ Object
- #inspect ⇒ Object
- #parity? ⇒ Boolean
Instance Attribute Details
#from ⇒ Object (readonly)
Returns the value of attribute from.
32 33 34 |
# File 'lib/lookout/diff/operation.rb', line 32 def from @from end |
#to ⇒ Object (readonly)
Returns the value of attribute to.
32 33 34 |
# File 'lib/lookout/diff/operation.rb', line 32 def to @to end |
Instance Method Details
#<<(size) ⇒ Object
16 17 18 |
# File 'lib/lookout/diff/operation.rb', line 16 def <<(size) self end |
#==(other) ⇒ Object
24 25 26 |
# File 'lib/lookout/diff/operation.rb', line 24 def ==(other) from == other.from and to == other.to end |
#>>(size) ⇒ Object
12 13 14 |
# File 'lib/lookout/diff/operation.rb', line 12 def >>(size) self end |
#foldable?(window) ⇒ Boolean
8 9 10 |
# File 'lib/lookout/diff/operation.rb', line 8 def foldable?(window) false end |
#initialize(from, to) ⇒ Object
4 5 6 |
# File 'lib/lookout/diff/operation.rb', line 4 def initialize(from, to) @from, @to = from, to end |
#inspect ⇒ Object
28 29 30 |
# File 'lib/lookout/diff/operation.rb', line 28 def inspect '#<%s %p,%p>' % [self.class, from, to] end |
#parity? ⇒ Boolean
20 21 22 |
# File 'lib/lookout/diff/operation.rb', line 20 def parity? false end |