Module: Flip::Facade
- Included in:
- Flip
- Defined in:
- lib/flip/facade.rb
Instance Method Summary
collapse
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, *parameters) ⇒ Object
12
13
14
15
|
# File 'lib/flip/facade.rb', line 12
def method_missing(method, *parameters)
super unless method =~ %r{^(.*)\?$}
FeatureSet.instance.on? $1.to_sym
end
|
Instance Method Details
#on?(feature) ⇒ Boolean
4
5
6
|
# File 'lib/flip/facade.rb', line 4
def on?(feature)
FeatureSet.instance.on? feature
end
|