Class: FeatureRich::Config
- Inherits:
-
ActiveSupport::OrderedOptions
- Object
- ActiveSupport::OrderedOptions
- FeatureRich::Config
- Defined in:
- lib/feature-rich/config.rb
Instance Method Summary collapse
-
#initialize(*args) ⇒ Config
constructor
A new instance of Config.
- #method_missing(name, *args) ⇒ Object
Constructor Details
#initialize(*args) ⇒ Config
Returns a new instance of Config.
3 4 5 6 |
# File 'lib/feature-rich/config.rb', line 3 def initialize(*args) super(*args) self.feature_model ||= "Feature" end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name, *args) ⇒ Object
9 10 11 12 13 14 15 |
# File 'lib/feature-rich/config.rb', line 9 def method_missing(name, *args) if args.size == 1 && name.to_s !~ /=$/ super("#{name}=",*args) else super(name, *args) end end |