Module: Downgrade
- Defined in:
- lib/downgrade.rb,
lib/downgrade/path.rb,
lib/downgrade/block.rb,
lib/downgrade/switch.rb,
lib/downgrade/version.rb,
lib/downgrade/middleware.rb
Defined Under Namespace
Classes: Block, Middleware, Path, Switch
Constant Summary
collapse
- VERSION =
"0.1.1"
Class Attribute Summary collapse
Class Method Summary
collapse
Class Attribute Details
.block_switch ⇒ Object
20
21
22
|
# File 'lib/downgrade.rb', line 20
def block_switch
@block_switch ||= Downgrade::Switch.new("block")
end
|
.cache_store ⇒ Object
32
33
34
|
# File 'lib/downgrade.rb', line 32
def cache_store
@cache_store ||= ActiveSupport::Cache::MemoryStore.new
end
|
.middleware_switch ⇒ Object
28
29
30
|
# File 'lib/downgrade.rb', line 28
def middleware_switch
@middleware_switch ||= Downgrade::Switch.new("middleware")
end
|
.path_switch ⇒ Object
24
25
26
|
# File 'lib/downgrade.rb', line 24
def path_switch
@path_switch ||= Downgrade::Switch.new("path")
end
|
.redis ⇒ Object
16
17
18
|
# File 'lib/downgrade.rb', line 16
def redis
@redis ||= Redis.new
end
|
Class Method Details
.path_regexps=(regexps) ⇒ Object
12
13
14
|
# File 'lib/downgrade.rb', line 12
def path_regexps=(regexps)
Downgrade::Path.regexps = regexps
end
|