module Riffer::Rig::Trust
Public Instance Methods
(String path) → (Hash[String, bool] | String)
Source
# File lib/riffer/rig/trust.rb, line 8 def read(path) document = Riffer::Rig::Support::JsonFile.read(path) document.is_a?(String) ? document : decisions(document) end
@rbs path: String @rbs return: (Hash[String, bool] | String)
(String path, String file, bool decision) → String?
Source
# File lib/riffer/rig/trust.rb, line 17 def store(path, file, decision) Riffer::Rig::Support::JsonFile.update(path) { |document| decisions(document).merge(file => decision) } end
@rbs path: String @rbs file: String @rbs decision: bool @rbs return: String?