Class: Mysqlknife::Parameter::Describe
- Defined in:
- lib/mysqlknife/parameter/describe.rb
Instance Attribute Summary collapse
-
#database ⇒ Object
writeonly
Sets the attribute database.
-
#table ⇒ Object
writeonly
Sets the attribute table.
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
#connections, #hosts, #initialize
Constructor Details
This class inherits a constructor from Mysqlknife::Parameter::Base
Instance Attribute Details
#database=(value) ⇒ Object (writeonly)
Sets the attribute database
6 7 8 |
# File 'lib/mysqlknife/parameter/describe.rb', line 6 def database=(value) @database = value end |
#table=(value) ⇒ Object (writeonly)
Sets the attribute table
6 7 8 |
# File 'lib/mysqlknife/parameter/describe.rb', line 6 def table=(value) @table = value end |
Instance Method Details
#connect ⇒ Object
8 9 10 11 12 13 14 15 |
# File 'lib/mysqlknife/parameter/describe.rb', line 8 def connect @config.connection(@connection) if @connection.nil? == false && @host.nil? == false puts "Connecting to: #{@config.select(@host)}" @command.execute(@mysql.describe(@database, @table)) end end |