Class: Lynx::Command::Dump
- Inherits:
-
Basic
- Object
- Basic
- Lynx::Command::Dump
show all
- Defined in:
- lib/lynx/command/dump.rb
Instance Attribute Summary
Attributes inherited from Basic
#config
Instance Method Summary
collapse
Methods inherited from Basic
#authorize, instruct, #option
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
25
26
27
28
29
|
# File 'lib/lynx/command/dump.rb', line 25
def table(*args)
@tables += args
self
end
|
#to_s ⇒ Object
31
32
33
|
# File 'lib/lynx/command/dump.rb', line 31
def to_s
"#{super} #{@database} #{@tables.join(' ')}"
end
|
#with_database ⇒ Object
19
20
21
22
23
|
# File 'lib/lynx/command/dump.rb', line 19
def with_database
@database = @config.database
self
end
|