Class: Mysqlknife::Command
- Inherits:
-
Object
- Object
- Mysqlknife::Command
- Defined in:
- lib/mysqlknife/command.rb
Instance Method Summary collapse
- #execute(cmd) ⇒ Object
-
#initialize ⇒ Command
constructor
A new instance of Command.
Constructor Details
Instance Method Details
#execute(cmd) ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/mysqlknife/command.rb', line 11 def execute(cmd) return false if cmd.nil? @iterm.color(@config.color) @iterm.name(@config.name) if @config.ssh[:use] cmd = @ssh.execute(cmd) end Mysqlknife::Log.new.command(cmd) system(cmd) ensure @iterm.name @iterm.reset end |