Class: Snoot::Location

Inherits:
Data
  • Object
show all
Defined in:
lib/snoot/value_types.rb

Overview

A source range: inclusive line_start/line_end at a Path. Used by Smell, ComplexityHit, and each DuplicationCluster entry; carries its own #description so the AnalyserOrchestration contract need not.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#line_endObject (readonly)

Returns the value of attribute line_end

Returns:

  • (Object)

    the current value of line_end



13
14
15
# File 'lib/snoot/value_types.rb', line 13

def line_end
  @line_end
end

#line_startObject (readonly)

Returns the value of attribute line_start

Returns:

  • (Object)

    the current value of line_start



13
14
15
# File 'lib/snoot/value_types.rb', line 13

def line_start
  @line_start
end

#pathObject (readonly)

Returns the value of attribute path

Returns:

  • (Object)

    the current value of path



13
14
15
# File 'lib/snoot/value_types.rb', line 13

def path
  @path
end

Instance Method Details

#descriptionObject



14
# File 'lib/snoot/value_types.rb', line 14

def description = "#{path.raw}:#{line_start}-#{line_end}"