Class: Racket::Plugins::Sass

Inherits:
Base
  • Object
show all
Defined in:
lib/racket/plugins/sass.rb

Overview

Sass plugin.

Instance Attribute Summary

Attributes inherited from Base

#settings

Instance Method Summary collapse

Methods inherited from Base

#default_controller_helpers

Constructor Details

#initialize(settings = nil) ⇒ Sass

Called on plugin initialization.



27
28
29
30
31
32
33
34
35
# File 'lib/racket/plugins/sass.rb', line 27

def initialize(settings = nil)
  super
  begin
    require 'sass/plugin/rack'
  rescue LoadError
    raise 'Failed to load sass rack plugin!'
  end
  apply_sass_settings
end

Instance Method Details

#middlewareObject

Middleware that should be automatically added.



38
39
40
# File 'lib/racket/plugins/sass.rb', line 38

def middleware
  [[::Sass::Plugin::Rack, nil]]
end