Class: Rack::Sprocketize
- Inherits:
-
Object
- Object
- Rack::Sprocketize
- Defined in:
- lib/rack/sprocketize.rb,
lib/rack/sprocketize/config.rb,
lib/rack/sprocketize/railtie.rb,
lib/rack/sprocketize/version.rb,
lib/rack/sprocketize/sprocket.rb
Defined Under Namespace
Classes: Config, Railtie, Sprocket
Constant Summary collapse
- VERSION =
'0.4.1'
Instance Attribute Summary collapse
-
#config ⇒ Object
Returns the value of attribute config.
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app, options = {}) ⇒ Sprocketize
constructor
A new instance of Sprocketize.
Constructor Details
#initialize(app, options = {}) ⇒ Sprocketize
Returns a new instance of Sprocketize.
12 13 14 15 |
# File 'lib/rack/sprocketize.rb', line 12 def initialize(app, = {}) @app = app @config = Config.new() end |
Instance Attribute Details
#config ⇒ Object
Returns the value of attribute config.
10 11 12 |
# File 'lib/rack/sprocketize.rb', line 10 def config @config end |
Instance Method Details
#call(env) ⇒ Object
17 18 19 20 21 |
# File 'lib/rack/sprocketize.rb', line 17 def call(env) @request = Rack::Request.new(env) sprocketize unless skip? @app.call(env) end |