Class: Snaptoken::Diff::DiffLine

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(type, line) ⇒ DiffLine

Returns a new instance of DiffLine.



25
26
27
28
# File 'lib/snaptoken/diff.rb', line 25

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

Instance Attribute Details

#lineObject (readonly)

Returns the value of attribute line.



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

def line
  @line
end

#typeObject

Returns the value of attribute type.



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

def type
  @type
end

Instance Method Details

#empty!Object



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

def empty!; @empty = true; end

#empty?Boolean

Returns:

  • (Boolean)


31
# File 'lib/snaptoken/diff.rb', line 31

def empty?; @empty; end

#omit!Object



33
# File 'lib/snaptoken/diff.rb', line 33

def omit!; @omit = true; end

#omit?Boolean

Returns:

  • (Boolean)


34
# File 'lib/snaptoken/diff.rb', line 34

def omit?; @omit; end