Module: Lookout::Diff::Operation

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#fromObject (readonly)

Returns the value of attribute from.



32
33
34
# File 'lib/lookout/diff/operation.rb', line 32

def from
  @from
end

#toObject (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

Returns:

  • (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

#inspectObject



28
29
30
# File 'lib/lookout/diff/operation.rb', line 28

def inspect
  '#<%s %p,%p>' % [self.class, from, to]
end

#parity?Boolean

Returns:

  • (Boolean)


20
21
22
# File 'lib/lookout/diff/operation.rb', line 20

def parity?
  false
end