class PgExport::Entities::Dump

Public Instance Methods

decrypt(cipher_factory:) click to toggle source
# 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:) click to toggle source
# 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) click to toggle source
# File lib/pg_export/lib/pg_export/entities/dump.rb, line 34
def file=(f)
  @file = Types::DumpFile[f]
end
to_s() click to toggle source
# File lib/pg_export/lib/pg_export/entities/dump.rb, line 30
def to_s
  "#{name} (#{file.size_human})"
end

Protected Instance Methods

type=(t) click to toggle source
# File lib/pg_export/lib/pg_export/entities/dump.rb, line 40
def type=(t)
  @type = Types::DumpType[t]
end