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



17
18
19
# File 'lib/rubyn_code/output/diff_renderer.rb', line 17

def content
  @content
end

#typeObject (readonly)

Returns the value of attribute type

Returns:

  • (Object)

    the current value of type



17
18
19
# File 'lib/rubyn_code/output/diff_renderer.rb', line 17

def type
  @type
end

Instance Method Details

#addition?Boolean

Returns:

  • (Boolean)


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

def addition? = type == :add

#context?Boolean

Returns:

  • (Boolean)


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

def context?  = type == :context

#deletion?Boolean

Returns:

  • (Boolean)


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

def deletion? = type == :delete