Class: Guideline::UnusedMethodChecker

Inherits:
Checker
  • Object
show all
Defined in:
lib/guideline/checkers/unused_method_checker.rb

Defined Under Namespace

Classes: Definition, MethodCallChecker, MethodChecker, MethodDefinitionChecker

Instance Method Summary collapse

Methods inherited from Checker

#errors, #has_error?, #initialize, #report

Constructor Details

This class inherits a constructor from Guideline::Checker

Instance Method Details

#check(path) ⇒ Object



5
6
7
8
9
# File 'lib/guideline/checkers/unused_method_checker.rb', line 5

def check(path)
  definition_visitor.check(path.to_s, path.read)
  report_unused_methods(path)
  clear_definitions
end

#prepare(path) ⇒ Object



11
12
13
# File 'lib/guideline/checkers/unused_method_checker.rb', line 11

def prepare(path)
  call_visitor.check(path.to_s, path.read)
end