Class: Rack::Cachely

Inherits:
Object
  • Object
show all
Defined in:
lib/rack-cachely.rb,
lib/rack-cachely/key.rb,
lib/rack-cachely/store.rb,
lib/rack-cachely/config.rb,
lib/rack-cachely/context.rb,
lib/rack-cachely/version.rb

Defined Under Namespace

Classes: Config, Context, Key, Store

Constant Summary collapse

VERSION =
"0.4.1"

Class Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(app, options = {}) ⇒ Cachely

Returns a new instance of Cachely.



17
18
19
20
# File 'lib/rack-cachely.rb', line 17

def initialize(app, options = {})
  @app = app
  self.class.config = Rack::Cachely::Config.new(options)
end

Class Attribute Details

.configObject

Returns the value of attribute config.



28
29
30
# File 'lib/rack-cachely.rb', line 28

def config
  @config
end

Instance Method Details

#call(env) ⇒ Object



22
23
24
# File 'lib/rack-cachely.rb', line 22

def call(env)
  Context.new(@app).call(env)
end