Class: Directive::ConfigBuilder
- Inherits:
-
Object
- Object
- Directive::ConfigBuilder
- Includes:
- ActiveSupport::Callbacks, DoubleConfigure
- Defined in:
- lib/directive/config_builder.rb
Instance Method Summary collapse
- #configure ⇒ Object
- #nested(namespace, &block) ⇒ Object
-
#option(*args, **kwargs, &block) ⇒ Object
NOTE: options must be set up before #configure is called.
- #reader ⇒ Object
Instance Method Details
#configure ⇒ Object
21 22 23 24 25 26 27 |
# File 'lib/directive/config_builder.rb', line 21 def configure run_callbacks :configure do mutex.synchronize do yield configuration end end end |
#nested(namespace, &block) ⇒ Object
34 35 36 |
# File 'lib/directive/config_builder.rb', line 34 def nested(namespace, &block) config_class.__send__(:nested, namespace, &block) end |
#option(*args, **kwargs, &block) ⇒ Object
NOTE: options must be set up before #configure is called
30 31 32 |
# File 'lib/directive/config_builder.rb', line 30 def option(*args, **kwargs, &block) config_class.__send__(:option, *args, **kwargs, &block) end |