This cop checks for uses of the deprecated methods Hash#has_key? and Hash#has_value?
# File lib/rubocop/cop/style/deprecated_hash_methods.rb, line 23 def autocorrect(node) @corrections << lambda do |corrector| corrector.replace(node.loc.selector, proper_method_name(node.loc.selector.source)) end end
# File lib/rubocop/cop/style/deprecated_hash_methods.rb, line 12 def on_send(node) _receiver, method_name, *args = *node return unless args.size == 1 && DEPRECATED_METHODS.include?(method_name) add_offense(node, :selector, format(MSG, method_name, proper_method_name(method_name))) end
Generated with the Darkfish Rdoc Generator 2.