lib/rack/less.rb in rack-less-1.0.0 vs lib/rack/less.rb in rack-less-1.1.0

- old
+ new

@@ -1,6 +1,7 @@ require 'rack' +require 'rack/less/config' require 'rack/less/base' require 'rack/less/options' require 'rack/less/request' require 'rack/less/response' require 'rack/less/source' @@ -20,18 +21,28 @@ # # run app module Rack::Less MIME_TYPE = "text/css" + @@config = Config.new class << self - # Proxy calls to Base.combinations - def combinations - Rack::Less::Base.combinations + # Configuration accessors for Rack::Less + # (see config.rb for details) + def configure + yield @@config if block_given? end - def combinations=(value={}) - Rack::Less::Base.combinations = value + def config + @@config + end + def config=(value) + @@config = value + end + + # Combinations config convenience method + def combinations(key=nil) + @@config.combinations(key) end end # Create a new Rack::Less middleware component