Class: RuboCop::Cop::InSpec::Deprecations::AttributeDefault
- Extended by:
- AutoCorrector
- Defined in:
- lib/rubocop/cop/inspec/deprecation/attribute_default.rb
Overview
The Chef InSpec inputs ‘default` option has been replaced with the `value` option.
Constant Summary collapse
- MSG =
'The InSpec inputs `default` option has been replaced with the `value` option.'
- RESTRICT_ON_SEND =
[:attribute, :input].freeze
Instance Method Summary collapse
Methods inherited from Base
Instance Method Details
#on_send(node) ⇒ Object
42 43 44 45 46 47 48 |
# File 'lib/rubocop/cop/inspec/deprecation/attribute_default.rb', line 42 def on_send(node) default?(node) do |n| add_offense(n, severity: :warning) do |corrector| corrector.replace(n, 'value') end end end |