Class: PgExport::Dump::Base
- Inherits:
-
Object
- Object
- PgExport::Dump::Base
- Extended by:
- Forwardable
- Includes:
- SizeHuman
- Defined in:
- lib/pg_export/entities/dump/base.rb
Direct Known Subclasses
Constant Summary collapse
- CHUNK_SIZE =
(2**16).freeze
Instance Method Summary collapse
- #ext ⇒ Object
-
#initialize ⇒ Base
constructor
A new instance of Base.
- #read_chunk ⇒ Object
- #to_s ⇒ Object
Methods included from SizeHuman
Constructor Details
#initialize ⇒ Base
Returns a new instance of Base.
11 12 13 |
# File 'lib/pg_export/entities/dump/base.rb', line 11 def initialize @file = Tempfile.new('dump') end |
Instance Method Details
#ext ⇒ Object
15 16 17 |
# File 'lib/pg_export/entities/dump/base.rb', line 15 def ext raise 'Overwrite it' end |
#read_chunk ⇒ Object
19 20 21 |
# File 'lib/pg_export/entities/dump/base.rb', line 19 def read_chunk raise 'Overwrite it' end |
#to_s ⇒ Object
23 24 25 |
# File 'lib/pg_export/entities/dump/base.rb', line 23 def to_s "#{name || self.class} #{file.class} (#{size_human})" end |