Class: Rack::Sprocketize

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

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, options = {})
  @app    = app
  @config = Config.new(options)
end

Instance Attribute Details

#configObject

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