module Sprockets::Configuration
def config=(config)
def config=(config) raise TypeError, "can't assign mutable config" unless config.frozen? @config = config end
def digest_class
Public: Returns a `Digest` implementation class.
def digest_class config[:digest_class] end
def digest_class=(klass)
environment.digest_class = Digest::MD5
`Digest::MD5`.
`Digest::` implementation such as `Digest::SHA256` or
Deprecated: Assign a `Digest` implementation class. This maybe any Ruby
def digest_class=(klass) self.config = config.merge(digest_class: klass).freeze end
def initialize_configuration(parent)
def initialize_configuration(parent) @config = parent.config @computed_config = parent.computed_config @logger = parent.logger @context_class = Class.new(parent.context_class) end
def version
It would be wise to increment this value anytime you make a
into the `Context`.
impossible to know when any custom helpers change that you mix
will take care of expiring the cache for you. However, its
Sprockets is able to track most file and directory changes and
expiring all asset caches.
The `Environment#version` is a custom value used for manually
def version config[:version] end
def version=(version)
environment.version = '2.0'
Assign an environment version.
def version=(version) self.config = hash_reassoc(config, :version) { version.dup } end