Class: Mysqlknife::Parameters
- Inherits:
-
Object
- Object
- Mysqlknife::Parameters
- Defined in:
- lib/mysqlknife/parameters.rb
Instance Attribute Summary collapse
-
#command ⇒ Object
readonly
Returns the value of attribute command.
-
#connection ⇒ Object
writeonly
Sets the attribute connection.
-
#database ⇒ Object
Returns the value of attribute database.
-
#tool ⇒ Object
writeonly
Sets the attribute tool.
Instance Method Summary collapse
- #connection_details ⇒ Object
- #connections ⇒ Object
-
#initialize ⇒ Parameters
constructor
A new instance of Parameters.
- #tools ⇒ Object
Constructor Details
#initialize ⇒ Parameters
Returns a new instance of Parameters.
8 9 10 |
# File 'lib/mysqlknife/parameters.rb', line 8 def initialize @cnf = Configs.instance end |
Instance Attribute Details
#command ⇒ Object (readonly)
Returns the value of attribute command.
6 7 8 |
# File 'lib/mysqlknife/parameters.rb', line 6 def command @command end |
#connection=(value) ⇒ Object (writeonly)
Sets the attribute connection
5 6 7 |
# File 'lib/mysqlknife/parameters.rb', line 5 def connection=(value) @connection = value end |
#database ⇒ Object
Returns the value of attribute database.
6 7 8 |
# File 'lib/mysqlknife/parameters.rb', line 6 def database @database end |
#tool=(value) ⇒ Object (writeonly)
Sets the attribute tool
5 6 7 |
# File 'lib/mysqlknife/parameters.rb', line 5 def tool=(value) @tool = value end |
Instance Method Details
#connection_details ⇒ Object
18 19 20 21 22 |
# File 'lib/mysqlknife/parameters.rb', line 18 def connection_details unless @connection.nil? puts @cnf.show(@connection) end end |
#connections ⇒ Object
12 13 14 15 16 |
# File 'lib/mysqlknife/parameters.rb', line 12 def connections if @connection.nil? puts @cnf.connections end end |
#tools ⇒ Object
24 25 26 27 28 29 |
# File 'lib/mysqlknife/parameters.rb', line 24 def tools if @connection.nil? == false && @tool.nil? == true puts @cnf.tools(@connection) end end |