Class: Guideline::UnusedMethodChecker::MethodChecker

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

Direct Known Subclasses

MethodCallChecker, MethodDefinitionChecker

Instance Method Summary collapse

Constructor Details

#initialize(&callback) ⇒ MethodChecker

Returns a new instance of MethodChecker.



74
75
76
77
# File 'lib/guideline/checkers/unused_method_checker.rb', line 74

def initialize(*, &callback)
  @callback = callback
  super
end

Instance Method Details

#call(method) ⇒ Object



79
80
81
# File 'lib/guideline/checkers/unused_method_checker.rb', line 79

def call(method)
  @callback.call(method)
end