Skip to main content

Chef/Modernize/ClassEvalActionClass

Cookstyle cops page

The Cookstyle cops department: Chef/Modernize

Enabled by defaultSupports autocorrectionTarget Chef Version
EnabledYes12.9+

In Chef Infra Client 12.9 and later it is no longer necessary to call the class_eval method on the action class block.

Examples

incorrect

action_class.class_eval do
  foo
end

correct

action_class do
  foo
end

Configurable attributes

NameDefault valueConfigurable values
Version Added7.23.0String
Include
  • **/resources/*.rb
Array

Thank you for your feedback!

×










Search Results