Method: PDK::Config::Setting#previous_setting=
- Defined in:
- lib/pdk/config/setting.rb
#previous_setting=(value) ⇒ Object (writeonly)
It is possible to have multiple setting definitions for the same setting; for example, defining a default value with a lambda, but the the validation is within a JSON schema document. These are expressed as two settings objects, and uses a single linked list to join them together:
(PDK::Config::JSONSchemaSetting) –previous_setting–> (PDK::Config::Setting)
So in the example above, calling default the on the first object in the list will:
-
Look at
defaulton PDK::Config::JSONSchemaSetting -
If a default could not be found then it calls
defaulton previous_setting -
If a default could not be found then it calls
defaulton previous_setting.previous_setting -
and so on down the linked list (chain) of settings
32 33 34 |
# File 'lib/pdk/config/setting.rb', line 32 def previous_setting=(value) @previous_setting = value end |