Parent

Methods

Class Index [+]

Quicksearch

Sass::Plugin::Rack

Rack middleware for compiling Sass code.

## Activate

    require 'sass/plugin/rack'
    use Sass::Plugin::Rack

## Customize

    Sass::Plugin.options.merge(
      :cache_location => './tmp/sass-cache',
      :never_update => environment != :production,
      :full_exception => environment != :production)

{file:SASS_REFERENCE.md#options See the Reference for more options}.

## Use

Put your Sass files in `public/stylesheets/sass`. Your CSS will be generated in `public/stylesheets`, and regenerated every request if necessary. The locations and frequency {file:SASS_REFERENCE.md#options can be customized}. That’s all there is to it!

Public Class Methods

new(app) click to toggle source

Initialize the middleware.

@param app [#] The Rack application

    # File lib/sass/plugin/rack.rb, line 30
30:       def initialize(app)
31:         @app = app
32:       end

Public Instance Methods

call(env) click to toggle source

Process a request, checking the Sass stylesheets for changes and updating them if necessary.

@param env The Rack request environment @return [(#, {String => String}, Object)] The Rack response

    # File lib/sass/plugin/rack.rb, line 39
39:       def call(env)
40:         Sass::Plugin.check_for_updates
41:         @app.call(env)
42:       end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.