Method: ProcessSettings::Testing::MonitorStub#targeted_value
- Defined in:
- lib/process_settings/testing/monitor_stub.rb
#targeted_value(*path, dynamic_context:, required: true) ⇒ Object
30 31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/process_settings/testing/monitor_stub.rb', line 30 def targeted_value(*path, dynamic_context:, required: true) result = @settings_hash.mine(*path, not_found_value: :not_found) if result == :not_found if required raise SettingsPathNotFound, "no settings found for path #{path.inspect}" else nil end else result end end |