Class: Moult::DuplicationReport::Occurrence

Inherits:
Struct
  • Object
show all
Defined in:
lib/moult/duplication_report.rb

Overview

One site of a clone group. symbol_id is the best-effort enclosing method (the shared cross-analysis join key), nil when the fragment is not inside a known method (top-level code, or a duplicated whole class). line is flay's reported start line — line granularity is all flay provides.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#fuzzyObject

Returns the value of attribute fuzzy

Returns:

  • (Object)

    the current value of fuzzy



17
18
19
# File 'lib/moult/duplication_report.rb', line 17

def fuzzy
  @fuzzy
end

#lineObject

Returns the value of attribute line

Returns:

  • (Object)

    the current value of line



17
18
19
# File 'lib/moult/duplication_report.rb', line 17

def line
  @line
end

#pathObject

Returns the value of attribute path

Returns:

  • (Object)

    the current value of path



17
18
19
# File 'lib/moult/duplication_report.rb', line 17

def path
  @path
end

#symbol_idObject

Returns the value of attribute symbol_id

Returns:

  • (Object)

    the current value of symbol_id



17
18
19
# File 'lib/moult/duplication_report.rb', line 17

def symbol_id
  @symbol_id
end

Instance Method Details

#to_hObject



18
19
20
# File 'lib/moult/duplication_report.rb', line 18

def to_h
  {symbol_id: symbol_id, path: path, line: line, fuzzy: fuzzy}
end