README.md in qonfig-0.9.0 vs README.md in qonfig-0.10.0

- old
+ new

@@ -20,10 +20,11 @@ ``` ## Usage - [Definition and Settings Access](#definition-and-access) +- [Dynamic value calculation](???) - [Configuration](#configuration) - [Inheritance](#inheritance) - [Composition](#composition) - [Hash representation](#hash-representation) - [Config reloading](#config-reloading) (reload config definitions and option values) @@ -96,9 +97,15 @@ # get a hash slice of setting options (and fail when the required key does not exist) config.slice(:vendor_api) # => { 'vendor_api' => { 'host' => 'app_service', 'user' => 'test_user' } } config.slice(:vendor_api, :user) # => { 'user' => 'test_user' } config.slice(:project_api) # => Qonfig::UnknownSettingError # (key does not exist) config.slice(:vendor_api, :port) # => Qonfig::UnknownSettingError # (key does not exist) + +# get value from the slice of setting options using the given key set (and fail when the required key does not exist) (works in slice manner) +config.slice_value(:vendor_api) # => { 'host' => 'app_service', 'user' => 'test_user' } +config.slice_value(:vendor_api, :user) # => 'test_user' +config.slice_value(:project_api) # => Qonfig::UnknownSettingError # (key does not exist) +config.slice_value(:vendor_api, :port) # => Qonfig::UnknownSettingError # (key does not exist) ``` --- ### Configuration