module Riffer::Rig::Settings::File
Constants
- PATH
Public Instance Methods
(String path) → (Hash[Symbol, untyped] | String)
Source
# File lib/riffer/rig/settings/file.rb, line 10 def read(path) Riffer::Rig::Support::JsonFile.read(path, symbolize_names: true) end
@rbs path: String @rbs return: (Hash[Symbol, untyped] | String)
(String model, path: String) → String?
Source
# File lib/riffer/rig/settings/file.rb, line 24 def store_model(model, path:) update(path) { |document| document.merge(model: model) } end
@rbs model: String @rbs path: String @rbs return: String?
(String level, path: String) → String?
Source
# File lib/riffer/rig/settings/file.rb, line 31 def store_reasoning(level, path:) update(path) { |document| document.merge(reasoning: level) } end
@rbs level: String @rbs path: String @rbs return: String?
(String path) { (Hash[Symbol, untyped]) → Hash[Symbol, untyped] } → String?
Source
# File lib/riffer/rig/settings/file.rb, line 17 def update(path, &) Riffer::Rig::Support::JsonFile.update(path, symbolize_names: true, &) end
@rbs path: String @rbs &: (Hash[Symbol, untyped]) -> Hash[Symbol, untyped] @rbs return: String?