Class: Snoot::Location
- Inherits:
-
Data
- Object
- Data
- Snoot::Location
- 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
-
#line_end ⇒ Object
readonly
Returns the value of attribute line_end.
-
#line_start ⇒ Object
readonly
Returns the value of attribute line_start.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
Instance Method Summary collapse
Instance Attribute Details
#line_end ⇒ Object (readonly)
Returns the value of attribute line_end
13 14 15 |
# File 'lib/snoot/value_types.rb', line 13 def line_end @line_end end |
#line_start ⇒ Object (readonly)
Returns the value of attribute line_start
13 14 15 |
# File 'lib/snoot/value_types.rb', line 13 def line_start @line_start end |
#path ⇒ Object (readonly)
Returns the value of attribute path
13 14 15 |
# File 'lib/snoot/value_types.rb', line 13 def path @path end |
Instance Method Details
#description ⇒ Object
14 |
# File 'lib/snoot/value_types.rb', line 14 def description = "#{path.raw}:#{line_start}-#{line_end}" |