Class: Lynx::Command::Dump
Instance Attribute Summary
Attributes inherited from Basic
Instance Method Summary collapse
-
#initialize(*args) ⇒ Dump
constructor
A new instance of Dump.
- #table(*args) ⇒ Object
- #to_s ⇒ Object
- #with_database ⇒ Object
Methods inherited from Basic
Constructor Details
#initialize(*args) ⇒ Dump
Returns a new instance of Dump.
6 7 8 9 10 11 12 13 |
# File 'lib/lynx/command/dump.rb', line 6 def initialize(*args) super(*args) @database = '--all-databases' @tables = [] dump end |
Instance Method Details
#table(*args) ⇒ Object
23 24 25 26 27 |
# File 'lib/lynx/command/dump.rb', line 23 def table(*args) @tables += args self end |
#to_s ⇒ Object
29 30 31 |
# File 'lib/lynx/command/dump.rb', line 29 def to_s "#{super} #{@database} #{@tables.join(' ')}" end |
#with_database ⇒ Object
17 18 19 20 21 |
# File 'lib/lynx/command/dump.rb', line 17 def with_database @database = @config.database self end |