Class: Directive::Reader
- Inherits:
-
Object
- Object
- Directive::Reader
- Includes:
- Tablesalt::StringableObject
- Defined in:
- lib/directive/reader.rb
Instance Method Summary collapse
- #config_eval(*path) ⇒ Object
-
#initialize(config) ⇒ Reader
constructor
A new instance of Reader.
Constructor Details
#initialize(config) ⇒ Reader
Returns a new instance of Reader.
7 8 9 |
# File 'lib/directive/reader.rb', line 7 def initialize(config) @config = config end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method_name) ⇒ Object (private)
19 20 21 22 23 24 |
# File 'lib/directive/reader.rb', line 19 def method_missing(method_name, *) return mutex.synchronize { config.public_send(method_name) } if config..include?(method_name) return config._nested_builders[method_name].reader if config._nested_builders.key?(method_name) super end |