Class: RuboCop::Cop::InSpecStyle::Apache
- Inherits:
-
RuboCop::Cop
- Object
- RuboCop::Cop
- RuboCop::Cop::InSpecStyle::Apache
- Defined in:
- lib/rubocop/cop/inspecstyle/apache.rb
Overview
Do not use apache
Constant Summary collapse
- MSG =
'Use a `apache_conf` instead of `#apache`. '\ 'This resource will be removed in InSpec 5.'
Instance Method Summary collapse
Instance Method Details
#autocorrect(node) ⇒ Object
39 40 41 42 43 |
# File 'lib/rubocop/cop/inspecstyle/apache.rb', line 39 def autocorrect(node) lambda do |corrector| corrector.replace(node.loc.selector, preferred_replacement) end end |
#on_send(node) ⇒ Object
33 34 35 36 37 |
# File 'lib/rubocop/cop/inspecstyle/apache.rb', line 33 def on_send(node) return unless apache?(node) add_offense(node, location: :selector) end |