Class: Cane::AbcCheck
- Inherits:
-
Struct
- Object
- Struct
- Cane::AbcCheck
- Defined in:
- lib/cane/abc_check.rb
Overview
Creates violations for methods that are too complicated using a simple algorithm run against the parse tree of a file to count assignments, branches, and conditionals. Borrows heavily from metric_abc.
Defined Under Namespace
Classes: InvalidAst, RubyAst
Instance Attribute Summary collapse
-
#opts ⇒ Object
Returns the value of attribute opts.
Instance Method Summary collapse
Instance Attribute Details
#opts ⇒ Object
Returns the value of attribute opts
11 12 13 |
# File 'lib/cane/abc_check.rb', line 11 def opts @opts end |
Instance Method Details
#violations ⇒ Object
12 13 14 15 16 |
# File 'lib/cane/abc_check.rb', line 12 def violations order file_names.map { |file_name| find_violations(file_name) }.flatten end |