Module: SknUtils::Exploring::Configuration
- Defined in:
- lib/skn_utils/exploring/configuration.rb
Defined Under Namespace
Classes: Options
Class Method Summary collapse
- .config ⇒ Object
-
.configure {|@configuration| ... } ⇒ Object
Initialize with both the configuration keys and default values.
- .option_defaults ⇒ Object
- .option_defaults=(parms) ⇒ Object
- .reset! ⇒ Object
Class Method Details
.config ⇒ Object
25 26 27 |
# File 'lib/skn_utils/exploring/configuration.rb', line 25 def config configure end |
.configure {|@configuration| ... } ⇒ Object
Initialize with both the configuration keys and default values
29 30 31 32 33 |
# File 'lib/skn_utils/exploring/configuration.rb', line 29 def configure # Initialize with both the configuration keys and default values @configuration || reset! yield(@configuration) if block_given? @configuration end |
.option_defaults ⇒ Object
13 14 15 |
# File 'lib/skn_utils/exploring/configuration.rb', line 13 def option_defaults @option_defaults ||= {one: 1, two: 2, three: 3} end |
.option_defaults=(parms) ⇒ Object
16 17 18 |
# File 'lib/skn_utils/exploring/configuration.rb', line 16 def option_defaults=(parms) @option_defaults = parms end |