Class: Sqldump::Dumper
- Inherits:
-
Object
- Object
- Sqldump::Dumper
- Defined in:
- lib/sqldump/dumper.rb
Instance Method Summary collapse
- #dump ⇒ Object
-
#initialize(dbh, options) ⇒ Dumper
constructor
A new instance of Dumper.
Constructor Details
#initialize(dbh, options) ⇒ Dumper
Returns a new instance of Dumper.
5 6 7 8 |
# File 'lib/sqldump/dumper.rb', line 5 def initialize(dbh, ) @dbh = dbh @options = end |
Instance Method Details
#dump ⇒ Object
10 11 12 13 14 15 16 17 18 19 |
# File 'lib/sqldump/dumper.rb', line 10 def dump begin sth = @dbh.execute(@options.sql) yield sth ensure sth.finish if sth end end |