Method: Middleman::Application#set

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

#set(key, value = nil, &block)

Deprecated.

Prefer accessing settings through "config".

This method returns an undefined value.

Set attributes (global variables)

Parameters:

  • key (Symbol)

    Name of the attribue

  • value (defaults to: nil)

    Attribute value



431
432
433
434
435
436
# File 'lib/middleman-core/application.rb', line 431

def set(key, value=nil, &block)
  logger.warn "Warning: `set :#{key}` is deprecated. Use `config[:#{key}] =` instead."

  value = block if block_given?
  config[key] = value
end