Class: Lockness::Decrypt
- Inherits:
-
Object
- Object
- Lockness::Decrypt
- Defined in:
- lib/lockness/decrypt.rb
Instance Attribute Summary collapse
-
#encrypted_file ⇒ Object
readonly
Returns the value of attribute encrypted_file.
Instance Method Summary collapse
- #decrypt ⇒ Object
-
#initialize(path:) ⇒ Decrypt
constructor
A new instance of Decrypt.
Constructor Details
#initialize(path:) ⇒ Decrypt
6 7 8 9 10 |
# File 'lib/lockness/decrypt.rb', line 6 def initialize(path:) @encrypted_file = EncryptedFile.new(path: path) file_not_found unless encrypted_file.exist? end |
Instance Attribute Details
#encrypted_file ⇒ Object (readonly)
Returns the value of attribute encrypted_file.
4 5 6 |
# File 'lib/lockness/decrypt.rb', line 4 def encrypted_file @encrypted_file end |
Instance Method Details
#decrypt ⇒ Object
12 13 14 |
# File 'lib/lockness/decrypt.rb', line 12 def decrypt Content.new(encrypted_file: encrypted_file).plain end |