Class: PgExport::Entities::Dump
- Inherits:
-
Object
- Object
- PgExport::Entities::Dump
- Defined in:
- lib/pg_export/lib/pg_export/entities/dump.rb
Instance Method Summary collapse
- #decrypt(cipher_factory:) ⇒ Object
- #encrypt(cipher_factory:) ⇒ Object
- #file=(f) ⇒ Object
- #to_s ⇒ Object
Instance Method Details
#decrypt(cipher_factory:) ⇒ Object
23 24 25 26 27 28 |
# File 'lib/pg_export/lib/pg_export/entities/dump.rb', line 23 def decrypt(cipher_factory:) self.file = file.copy(cipher: cipher_factory.decryptor) self.type = :plain self end |
#encrypt(cipher_factory:) ⇒ Object
16 17 18 19 20 21 |
# File 'lib/pg_export/lib/pg_export/entities/dump.rb', line 16 def encrypt(cipher_factory:) self.file = file.copy(cipher: cipher_factory.encryptor) self.type = :encrypted self end |
#file=(f) ⇒ Object
34 35 36 |
# File 'lib/pg_export/lib/pg_export/entities/dump.rb', line 34 def file=(f) @file = Types::DumpFile[f] end |
#to_s ⇒ Object
30 31 32 |
# File 'lib/pg_export/lib/pg_export/entities/dump.rb', line 30 def to_s "#{name} (#{file.size_human})" end |