Class: Configurations::StrictConfiguration
- Inherits:
-
Configuration
- Object
- BlankObject
- Configuration
- Configurations::StrictConfiguration
- Defined in:
- lib/configurations/strict.rb
Overview
StrictConfiguration is a blank object with setters and getters defined according to the configurable settings given
Constant Summary
Constants inherited from BlankObject
BlankObject::ALIAS_KERNEL_METHODS, BlankObject::KEEP_KERNEL_METHODS, BlankObject::KEEP_METHODS
Instance Method Summary collapse
-
#__configurable?(property) ⇒ Boolean
Whether the given property is configurable.
-
#initialize(options = {}, &block) {|HostModule::Configuration| ... } ⇒ HostModule::Configuration
constructor
Initialize a new configuration.
Methods inherited from Configuration
#__configured?, #__empty?, #from_h, #method_missing, #respond_to_missing?, #to_h
Methods inherited from BlankObject
Constructor Details
#initialize(options = {}, &block) {|HostModule::Configuration| ... } ⇒ HostModule::Configuration
Initialize a new configuration
18 19 20 21 22 23 |
# File 'lib/configurations/strict.rb', line 18 def initialize( = {}, &block) @__configurable__ = .fetch(:configurable) __evaluate_configurable! super end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Configurations::Configuration
Instance Method Details
#__configurable?(property) ⇒ Boolean
Returns whether the given property is configurable.
28 29 30 31 |
# File 'lib/configurations/strict.rb', line 28 def __configurable?(property) @__configurable__.key?(property) || @__nested_configurables__.key?(property) end |