Class: Middleman::Autoprefixer::Extension

Inherits:
Extension
  • Object
show all
Defined in:
lib/middleman-autoprefixer/extension.rb

Defined Under Namespace

Classes: Rack

Instance Method Summary collapse

Constructor Details

#initialize(app, options = {}, &block) ⇒ Extension

Returns a new instance of Extension.



14
15
16
17
18
19
20
# File 'lib/middleman-autoprefixer/extension.rb', line 14

def initialize(app, options = {}, &block)
  super

  require 'middleman-core/util'
  require 'autoprefixer-rails/result'
  require 'autoprefixer-rails/processor'
end

Instance Method Details

#after_configurationObject



22
23
24
25
# File 'lib/middleman-autoprefixer/extension.rb', line 22

def after_configuration
  # Setup Rack middleware to apply prefixes
  app.use Rack, config: options, middleman_app: @app
end