Class: Leg::Diff::DiffLine

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(type, line) ⇒ DiffLine

Returns a new instance of DiffLine.



21
22
23
24
# File 'lib/leg/diff.rb', line 21

def initialize(type, line)
  @type = type
  @line = line
end

Instance Attribute Details

#lineObject (readonly)

Returns the value of attribute line.



18
19
20
# File 'lib/leg/diff.rb', line 18

def line
  @line
end

#typeObject

Returns the value of attribute type.



18
19
20
# File 'lib/leg/diff.rb', line 18

def type
  @type
end

Instance Method Details

#empty!Object



26
# File 'lib/leg/diff.rb', line 26

def empty!; @empty = true; end

#empty?Boolean

Returns:

  • (Boolean)


27
# File 'lib/leg/diff.rb', line 27

def empty?; @empty; end

#omit!Object



29
# File 'lib/leg/diff.rb', line 29

def omit!; @omit = true; end

#omit?Boolean

Returns:

  • (Boolean)


30
# File 'lib/leg/diff.rb', line 30

def omit?; @omit; end