Class: RubynCode::Output::DiffRenderer::DiffLine

Inherits:
Data
  • Object
show all
Defined in:
lib/rubyn_code/output/diff_renderer.rb

Overview

Represents a single diff line with its type and content.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#contentObject (readonly)

Returns the value of attribute content

Returns:

  • (Object)

    the current value of content



12
13
14
# File 'lib/rubyn_code/output/diff_renderer.rb', line 12

def content
  @content
end

#typeObject (readonly)

Returns the value of attribute type

Returns:

  • (Object)

    the current value of type



12
13
14
# File 'lib/rubyn_code/output/diff_renderer.rb', line 12

def type
  @type
end

Instance Method Details

#addition?Boolean

Returns:

  • (Boolean)


13
# File 'lib/rubyn_code/output/diff_renderer.rb', line 13

def addition? = type == :add

#context?Boolean

Returns:

  • (Boolean)


15
# File 'lib/rubyn_code/output/diff_renderer.rb', line 15

def context?  = type == :context

#deletion?Boolean

Returns:

  • (Boolean)


14
# File 'lib/rubyn_code/output/diff_renderer.rb', line 14

def deletion? = type == :delete