Class: RuboCop::Cop::Primer::DeprecatedLayoutComponent
- Defined in:
- lib/rubocop/cop/primer/deprecated_layout_component.rb
Overview
This cop ensures that the deprecated ‘Primer::LayoutComponent` isn’t used.
bad Primer::LayoutComponent.new(foo: :deprecated)
good Primer::Alpha::Layout.new(foo: :deprecated)
Constant Summary collapse
- MSG =
"Please try Primer::Alpha::Layout instead."
Instance Method Summary collapse
Methods inherited from BaseCop
Instance Method Details
#on_send(node) ⇒ Object
22 23 24 25 26 |
# File 'lib/rubocop/cop/primer/deprecated_layout_component.rb', line 22 def on_send(node) return unless legacy_component?(node) add_offense(node, message: MSG) end |