Class: CryptReboot::LazyConfig
- Inherits:
-
Object
- Object
- CryptReboot::LazyConfig
- Defined in:
- lib/crypt_reboot/lazy_config.rb
Overview
Return getter lambdas instead of configuration settings directly
Class Method Summary collapse
- .instance ⇒ Object
- .method_missing(method_name, *args, **kwargs, &block) ⇒ Object
- .respond_to_missing?(name, *_, **_) ⇒ Boolean
Class Method Details
.instance ⇒ Object
17 18 19 |
# File 'lib/crypt_reboot/lazy_config.rb', line 17 def instance Config.instance end |
.method_missing(method_name, *args, **kwargs, &block) ⇒ Object
7 8 9 10 11 |
# File 'lib/crypt_reboot/lazy_config.rb', line 7 def method_missing(method_name, *args, **kwargs, &block) return super unless instance.respond_to?(method_name) -> { instance.send(method_name, *args, **kwargs, &block) } end |
.respond_to_missing?(name, *_, **_) ⇒ Boolean
13 14 15 |
# File 'lib/crypt_reboot/lazy_config.rb', line 13 def respond_to_missing?(name, *_, **_) instance.respond_to?(name) end |