Class: Cane::AbcCheck::RubyAst
- Inherits:
-
Struct
- Object
- Struct
- Cane::AbcCheck::RubyAst
- Defined in:
- lib/cane/abc_check.rb
Overview
Wrapper object around sexps returned from ripper.
Instance Method Summary collapse
Instance Method Details
#violations ⇒ Object
39 40 41 42 43 |
# File 'lib/cane/abc_check.rb', line 39 def violations process_ast(sexps). select { |nesting, complexity| complexity > max_allowed_complexity }. map { |x| AbcMaxViolation.new(file_name, x.first, x.last) } end |