Skip to main content

ActionMethodInResource

All Cookstyle Cops


The department is: Chef/Modernize

The full name of the cop is: Chef/Modernize/ActionMethodInResource


Enabled by default Supports autocorrection Target Chef Version
Enabled Yes All Versions

Use the custom resource language’s action :my_action blocks instead of creating actions with methods.

Examples

incorrect

def action_create
 # :create action code here
end

correct

action :create do
 # :create action code here
end

Configurable attributes

Name Default value Configurable values
Version Added 6.13.0 String
Include
  • **/resources/*.rb
  • **/providers/*.rb
Array

Was this page helpful?

×








Search Results