class PuppetDocLint class Configuration # Code blatently stolen from https://github.com/rodjek/puppet-lint # Internal: Add helper methods for a new check to the # PuppetDocLint::Configuration object. # # check - The String name of the check. # # Returns nothing. # # Signature # # _enabled? # disable_ # enable_ def self.add_check(check) # Public: Determine if the named check is enabled. # # Returns true if the check is enabled, otherwise return false. define_method("#{check}_enabled?") do settings["#{check}_disabled"] == true ? false : true end # Public: Disable the named check. # # Returns nothing. define_method("disable_#{check}") do settings["#{check}_disabled"] = true end # Public: Enable the named check. # # Returns nothing. define_method("enable_#{check}") do settings["#{check}_disabled"] = false end end # Public: Catch situations where options are being set for the first time # and create the necessary methods to get & set the option in the future. # # args[0] - The value to set the option to. # # Returns nothing. # # Signature # #