class ConfidentialInfoManager::YAML
Public Instance Methods
load(file_path)
click to toggle source
YAML
file load @param [String] file_path @return [Hash]
# File lib/confidential_info_manager/yaml.rb, line 20 def load(file_path) decrypt_only_value(::YAML.load(File.read(file_path))) end
save(secret_data, file_path)
click to toggle source
YAML
file save @param [Object] secret_data
@note Object is a String or Array or Hash
@param [String] file_path
# File lib/confidential_info_manager/yaml.rb, line 12 def save(secret_data, file_path) File.open(file_path, "w") { |file| ::YAML.dump(encrypt_only_value(secret_data), file) } end