lib/reek/smell_detectors/manual_dispatch.rb in reek-4.8.2 vs lib/reek/smell_detectors/manual_dispatch.rb in reek-5.0.0
- old
+ new
@@ -10,21 +10,21 @@
#
# The +ManualDispatch+ checker reports any invocation of +respond_to?+
#
# See {file:docs/Manual-Dispatch.md} for details.
class ManualDispatch < BaseDetector
- MESSAGE = 'manually dispatches method call'.freeze
+ MESSAGE = 'manually dispatches method call'
#
# Checks for +respond_to?+ usage within the given method
#
# @return [Array<SmellWarning>]
#
def sniff
smelly_nodes = context.local_nodes(:send).select { |node| node.name == :respond_to? }
return [] if smelly_nodes.empty?
lines = smelly_nodes.map(&:line)
- [smell_warning(context: context, lines: lines, message: MESSAGE)]
+ [smell_warning(lines: lines, message: MESSAGE)]
end
end
end
end