Skip to main content

Chef/Ruby/UnlessDefinedRequire

Cookstyle cops page

The Cookstyle cops department: Chef/Ruby

Enabled by defaultSupports autocorrectionTarget Chef Version
Not EnabledYesAll Versions

Rubygems is VERY slow to require gems even if they’ve already been loaded. To work around this wrap your require statement with an if defined?() check.

Examples

Configurable attributes

NameDefault valueConfigurable values
Version AddedString
Include
    Array

    Thank you for your feedback!

    ×









    Search Results