Sha256: 5ef0f5a54425ebb1fac4b0270462ab05616ba378c3d860679071380ae74529fc

Contents?: true

Size: 687 Bytes

Versions: 12

Compression:

Stored size: 687 Bytes

Contents

require 'sass'

module Sprockets
  module Sass
    class CacheStore < ::Sass::CacheStores::Base
      attr_reader :environment
  
      def initialize(environment)
        @environment = environment
      end
  
      def _store(key, version, sha, contents)
        environment.send :cache_set, "sass/#{key}", { :version => version, :sha => sha, :contents => contents }
      end
  
      def _retrieve(key, version, sha)
        if obj = environment.send(:cache_get, "sass/#{key}")
          return unless obj[:version] == version
          return unless obj[:sha] == sha
          obj[:obj]
        else
          nil
        end
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 2 rubygems

Version Path
arcabouco-0.2.13 vendor/bundle/gems/sprockets-sass-1.3.1/lib/sprockets/sass/cache_store.rb
sprockets-sass-1.3.1 lib/sprockets/sass/cache_store.rb
sprockets-sass-1.3.0 lib/sprockets/sass/cache_store.rb
sprockets-sass-1.2.0 lib/sprockets/sass/cache_store.rb
sprockets-sass-1.1.0 lib/sprockets/sass/cache_store.rb
sprockets-sass-1.0.3 lib/sprockets/sass/cache_store.rb
sprockets-sass-1.0.2 lib/sprockets/sass/cache_store.rb
sprockets-sass-1.0.1 lib/sprockets/sass/cache_store.rb
sprockets-sass-1.0.0 lib/sprockets/sass/cache_store.rb
sprockets-sass-0.9.1 lib/sprockets/sass/cache_store.rb
sprockets-sass-0.9.0 lib/sprockets/sass/cache_store.rb
sprockets-sass-0.8.0 lib/sprockets/sass/cache_store.rb