Class: Cane::AbcMaxViolation

Inherits:
Struct
  • Object
show all
Defined in:
lib/cane/abc_max_violation.rb

Overview

Value object used by AbcCheck for a method that is too complicated.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#complexityObject Also known as: sort_index

Returns the value of attribute complexity

Returns:

  • (Object)

    the current value of complexity



4
5
6
# File 'lib/cane/abc_max_violation.rb', line 4

def complexity
  @complexity
end

#detailObject

Returns the value of attribute detail

Returns:

  • (Object)

    the current value of detail



4
5
6
# File 'lib/cane/abc_max_violation.rb', line 4

def detail
  @detail
end

#file_nameObject

Returns the value of attribute file_name

Returns:

  • (Object)

    the current value of file_name



4
5
6
# File 'lib/cane/abc_max_violation.rb', line 4

def file_name
  @file_name
end

Instance Method Details

#columnsObject



5
6
7
# File 'lib/cane/abc_max_violation.rb', line 5

def columns
  [file_name, detail, complexity]
end

#descriptionObject



9
10
11
# File 'lib/cane/abc_max_violation.rb', line 9

def description
  "Methods exceeded maximum allowed ABC complexity"
end