Sha256: 40e7259686457bb94d074a26fbe59f492f232da3669bd7686584e66f93063f51
Contents?: true
Size: 569 Bytes
Versions: 1
Compression:
Stored size: 569 Bytes
Contents
# frozen_string_literal: true require 'open3' require 'tempfile' require 'pg_export/lib/pg_export/entities/dump' class PgExport module Factories class DumpFactory def plain(database:, file:) Entities::Dump.new( name: [database, timestamp].join('_'), database: database, file: file, type: :plain ) end private TIMESTAMP_FORMAT = '%Y%m%d_%H%M%S' private_constant :TIMESTAMP_FORMAT def timestamp Time.now.strftime(TIMESTAMP_FORMAT) end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
pg_export-1.0.0.rc6 | lib/pg_export/lib/pg_export/factories/dump_factory.rb |