Module: Rack::Sprockets::Options

Included in:
Base, Request, Response
Defined in:
lib/rack/sprockets/options.rb

Defined Under Namespace

Modules: ClassMethods, InstanceMethods

Constant Summary collapse

RACK_ENV_NS =

Handles options for Rack::Sprockets Available options:

> root

The app root.  The reference point for
the source and public options.  Maps to
the `:root` Sprockets option.

> public

The path where static files are located.
Maps to the `:asset_root` Sprockets option.

> source

The path where Sprockets source files are
located.  Notice this does not map to the
`:source_files` Sprockets option.  It is
assumed that any requested resource found
in `:source` be treated as a Sprockets
source file.

> hosted_at

The public hosted HTTP path for static
javascripts files.

> load_path

An ordered array of directory names to
search for dependencies in.  Maps to the
`:load_path` Sprockets option.

> expand_paths

Whether or not to expand filenames according
to shell glob rules.  Maps to the
`:expand_paths` Sprockets option.
"rack-sprockets"
COLLECTION_OPTS =
["#{RACK_ENV_NS}.load_path"]

Class Method Summary collapse

Class Method Details

.included(receiver) ⇒ Object



125
126
127
128
# File 'lib/rack/sprockets/options.rb', line 125

def self.included(receiver)
  receiver.extend         ClassMethods
  receiver.send :include, InstanceMethods
end