Class: Anvil::Mysql::ScriptRunner
- Inherits:
-
Struct
- Object
- Struct
- Anvil::Mysql::ScriptRunner
- Defined in:
- lib/anvil/script_runner.rb
Instance Attribute Summary collapse
-
#host ⇒ Object
Returns the value of attribute host.
-
#logger ⇒ Object
Returns the value of attribute logger.
-
#script ⇒ Object
Returns the value of attribute script.
-
#user ⇒ Object
Returns the value of attribute user.
Instance Method Summary collapse
Instance Attribute Details
#host ⇒ Object
Returns the value of attribute host
4 5 6 |
# File 'lib/anvil/script_runner.rb', line 4 def host @host end |
#logger ⇒ Object
Returns the value of attribute logger
4 5 6 |
# File 'lib/anvil/script_runner.rb', line 4 def logger @logger end |
#script ⇒ Object
Returns the value of attribute script
4 5 6 |
# File 'lib/anvil/script_runner.rb', line 4 def script @script end |
#user ⇒ Object
Returns the value of attribute user
4 5 6 |
# File 'lib/anvil/script_runner.rb', line 4 def user @user end |
Instance Method Details
#call ⇒ Object
5 6 7 8 9 |
# File 'lib/anvil/script_runner.rb', line 5 def call SshExecutor.new(host, user, logger).call do |ssh| ssh.exec! script, "SSH" end end |