class Middleman::Extension
def setup_options(options_hash)
- Yieldparam: Middleman::Configuration::ConfigurationManager - iddleman::Configuration::ConfigurationManager] options Extension options
Other tags:
- Yield: - An optional block that can be used to customize options before the extension is activated.
def setup_options(options_hash) @options = self.class.config.dup @options.finalize! options_hash.each do |k, v| @options[k] = v end yield @options, self if block_given? @options.all_settings.each do |o| next unless o.options[:required] && !o.value_set? logger.error "The `:#{o.key}` option of the `#{self.class.ext_name}` extension is required." exit(1) end end