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.



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

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

Instance Attribute Details

#lineObject (readonly)

Returns the value of attribute line.



19
20
21
# File 'lib/snaptoken/diff.rb', line 19

def line
  @line
end

#typeObject

Returns the value of attribute type.



19
20
21
# File 'lib/snaptoken/diff.rb', line 19

def type
  @type
end

Instance Method Details

#empty!Object



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

def empty!; @empty = true; end

#empty?Boolean

Returns:

  • (Boolean)


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

def empty?; @empty; end

#omit!Object



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

def omit!; @omit = true; end

#omit?Boolean

Returns:

  • (Boolean)


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

def omit?; @omit; end