Class: EJSONWrapper::DecryptEJSONFile

Inherits:
Object
  • Object
show all
Defined in:
lib/ejson_wrapper/decrypt_ejson_file.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.call(file_path, **args) ⇒ Object



7
8
9
# File 'lib/ejson_wrapper/decrypt_ejson_file.rb', line 7

def self.call(file_path, **args)
  new.call(file_path, **args)
end

Instance Method Details

#call(file_path, key_dir: nil, private_key: nil) ⇒ Object



11
12
13
14
# File 'lib/ejson_wrapper/decrypt_ejson_file.rb', line 11

def call(file_path, key_dir: nil, private_key: nil)
  decrypted_json = invoke_decrypt(file_path, key_dir: key_dir, private_key: private_key)
  parse_json(decrypted_json)
end