class RuboCop::Cop::InSpec::Deprecations::AttributeHelper
InSpec
attributes have been renamed to inputs. Use the `input` method not the deprecation `attribute` method to access these values.
@example
#### incorrect login_defs_umask = attribute('login_defs_umask', value: '077', description: 'Default umask to set in login.defs') #### correct login_defs_umask = input('login_defs_umask', value: '077', description: 'Default umask to set in login.defs')
Constants
- MSG
- RESTRICT_ON_SEND
Public Instance Methods
on_send(node)
click to toggle source
# File lib/rubocop/cop/inspec/deprecation/attribute_helper.rb, line 38 def on_send(node) add_offense(node, message: MSG, severity: :warning) do |corrector| corrector.replace(node.loc.expression, node.loc.expression.source.gsub(/^attribute/, 'input')) end end