module MyExtension

Extension namespace

Public Class Methods

included(app, options={})
Alias for: registered
registered(app, options={}) click to toggle source

Called when user ‘activate`s your extension

# File lib/middleman-core/templates/extension/lib/lib.rb, line 9
def registered(app, options={})
  # Setup extension-specific config
  app.set :config_variable, false

  # Include class methods
  # app.extend ClassMethods

  # Include instance methods
  # app.send :include, InstanceMethods

  app.after_configuration do
    # Do something

    # config_variable is now either the default or the user's
    # setting from config.rb
  end
end
Also aliased as: included