Module: Togl
- Defined in:
- lib/togl.rb,
lib/togl/util.rb,
lib/togl/config.rb,
lib/togl/adapter.rb,
lib/togl/feature.rb,
lib/togl/version.rb,
lib/togl/adapter/redis.rb,
lib/togl/rack/middleware.rb,
lib/togl/adapter/rack_session.rb
Defined Under Namespace
Modules: Rack, Util
Classes: Adapter, Config, Feature
Constant Summary
collapse
- InvalidFeatureName =
Class.new(StandardError)
- VERSION =
"0.2.0"
Class Method Summary
collapse
Class Method Details
.config ⇒ Object
8
9
10
|
# File 'lib/togl.rb', line 8
def self.config
@config ||= Config.new
end
|
12
13
14
15
|
# File 'lib/togl.rb', line 12
def self.configure(&block)
@config ||= Config.new
@config.instance_eval(&block)
end
|
.off?(feature) ⇒ Boolean
21
22
23
|
# File 'lib/togl.rb', line 21
def self.off?(feature)
config.off?(feature)
end
|
.on?(feature) ⇒ Boolean
17
18
19
|
# File 'lib/togl.rb', line 17
def self.on?(feature)
config.on?(feature)
end
|