Skip to content

Instantly share code, notes, and snippets.

@buth
Created August 14, 2014 15:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save buth/f8e91055488554a27c78 to your computer and use it in GitHub Desktop.
Save buth/f8e91055488554a27c78 to your computer and use it in GitHub Desktop.
Add `required` to mixlib-config.
require 'mixlib/config'
module MyConfig
extend Mixlib::Config
def self.required(name)
default(name) {raise "You must provide a configuration value for #{name}."}
end
config_strict_mode true
required :this_value_is_required
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment