module Middleman::CoreExtensions::Extensions::InstanceMethods

def activate(ext, options={}, &block)

Returns:
  • (void) -

Parameters:
  • ext (Symbol, Module) -- Which extension to activate
def activate(ext, options={}, &block)
  # Make :i18n a no-op
  return if ext == :i18n
  ext_module = if ext.is_a?(Module)
    ext
  else
    ::Middleman::Extensions.load(ext.to_sym)
  end
  if ext_module.nil?
    puts "== Unknown Extension: #{ext}"
  else
    puts "== Activating: #{ext}" if logging?
    self.class.register(ext_module, options, &block)
  end
end