class RuboCop::Cop::Primer::DeprecatedLabelSchemes
def on_send(node)
def on_send(node) return unless label_node?(node) return unless node.arguments? # we are looking for hash arguments and they are always last kwargs = node.arguments.last return unless kwargs.type == :hash kwargs.pairs.each do |pair| # Skip if we're not dealing with a symbol next if pair.key.type != :sym next unless pair.value.type == :sym || pair.value.type == :str value = pair.value.value.to_sym next unless DEPRECATIONS.key?(value) add_offense(pair.value, message: INVALID_MESSAGE) end end