Class: Candidate

Inherits:
Data
  • Object
show all
Defined in:
lib/ruby_duplicates/cli.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#end_lineObject (readonly)

Returns the value of attribute end_line

Returns:

  • (Object)

    the current value of end_line



10
11
12
# File 'lib/ruby_duplicates/cli.rb', line 10

def end_line
  @end_line
end

#fileObject (readonly)

Returns the value of attribute file

Returns:

  • (Object)

    the current value of file



10
11
12
# File 'lib/ruby_duplicates/cli.rb', line 10

def file
  @file
end

#fingerprintsObject (readonly)

Returns the value of attribute fingerprints

Returns:

  • (Object)

    the current value of fingerprints



10
11
12
# File 'lib/ruby_duplicates/cli.rb', line 10

def fingerprints
  @fingerprints
end

#nameObject (readonly)

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



10
11
12
# File 'lib/ruby_duplicates/cli.rb', line 10

def name
  @name
end

#node_countObject (readonly)

Returns the value of attribute node_count

Returns:

  • (Object)

    the current value of node_count



10
11
12
# File 'lib/ruby_duplicates/cli.rb', line 10

def node_count
  @node_count
end

#start_lineObject (readonly)

Returns the value of attribute start_line

Returns:

  • (Object)

    the current value of start_line



10
11
12
# File 'lib/ruby_duplicates/cli.rb', line 10

def start_line
  @start_line
end

Instance Method Details

#line_countObject



11
12
13
# File 'lib/ruby_duplicates/cli.rb', line 11

def line_count
  end_line - start_line + 1
end

#locationObject



15
16
17
# File 'lib/ruby_duplicates/cli.rb', line 15

def location
  "#{file}:#{start_line}-#{end_line}"
end