Method: RuboCop::Cop::Primer::ComponentNameMigration#on_send
- Defined in:
- lib/rubocop/cop/primer/component_name_migration.rb
permalink #on_send(node) ⇒ Object
[View source]
18 19 20 21 22 23 |
# File 'lib/rubocop/cop/primer/component_name_migration.rb', line 18 def on_send(node) return unless node.method_name == :new && !node.receiver.nil? && ::Primer::Deprecations.deprecated?(node.receiver.const_name) = ::Primer::Deprecations.(node.receiver.const_name) add_offense(node.receiver, message: ) end |