Class: SecretKeys::CLI::Decrypt
Constant Summary
Constants inherited from Base
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
#format, #initialize, #parse_additional_options, #secrets
Constructor Details
This class inherits a constructor from SecretKeys::CLI::Base
Instance Method Details
#action_name ⇒ Object
232 233 234 |
# File 'lib/secret_keys/cli.rb', line 232 def action_name "decrypt" end |
#run! ⇒ Object
236 237 238 239 240 241 242 |
# File 'lib/secret_keys/cli.rb', line 236 def run! decrypted = secrets.to_h string = ((format == :yaml) ? YAML.dump(decrypted) : JSON.pretty_generate(decrypted)) string << $/ unless string.end_with?($/) # ensure file ends with system dependent new line $stdout.write(string) $stdout.flush end |