Method: Middleman::Extension.option

Defined in:
lib/middleman-core/extension.rb

.option(key, default = nil, description = nil, options = {}) ⇒ Object

Add an option to this extension.

Examples:

option :compress, false, 'Whether to compress the output'

Parameters:

  • key (Symbol)

    The name of the option

  • default (Object) (defaults to: nil)

    The default value for the option

  • description (String) (defaults to: nil)

    A human-readable description of what the option does

See Also:



137
138
139
# File 'lib/middleman-core/extension.rb', line 137

def option(key, default=nil, description=nil, options={})
  config.define_setting(key, default, description, options)
end