Class: RuboCop::Cop::Primer::BaseCop
- Inherits:
-
Cop
- Object
- Cop
- RuboCop::Cop::Primer::BaseCop
- Defined in:
- lib/rubocop/cop/primer/base_cop.rb
Overview
:nodoc:
Direct Known Subclasses
ComponentNameMigration, DeprecatedArguments, DeprecatedButtonArguments, DeprecatedComponents, DeprecatedLabelSchemes, DeprecatedLabelVariants, DeprecatedLayoutComponent, TestSelector
Instance Method Summary collapse
-
#valid_node?(node) ⇒ Boolean
We only verify SystemArguments if it’s a ‘.new` call on a component or a ViewHeleper call.
Instance Method Details
#valid_node?(node) ⇒ Boolean
We only verify SystemArguments if it’s a ‘.new` call on a component or a ViewHeleper call.
14 15 16 17 18 |
# File 'lib/rubocop/cop/primer/base_cop.rb', line 14 def valid_node?(node) return false if node.nil? view_helpers.include?(node.method_name) || (node.method_name == :new && !node.receiver.nil? && ::Primer::ViewComponents::STATUSES.key?(node.receiver.const_name)) end |