Class: Capistrano::Interactive::Command
- Inherits:
-
Object
- Object
- Capistrano::Interactive::Command
- Defined in:
- lib/capistrano/interactive/command.rb
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(host, command) ⇒ Command
constructor
A new instance of Command.
- #to_cmd ⇒ Object
Constructor Details
#initialize(host, command) ⇒ Command
Returns a new instance of Command.
4 5 6 7 |
# File 'lib/capistrano/interactive/command.rb', line 4 def initialize(host, command) @host = host @command = command end |
Instance Method Details
#execute ⇒ Object
18 19 20 |
# File 'lib/capistrano/interactive/command.rb', line 18 def execute exec(to_cmd) end |
#to_cmd ⇒ Object
9 10 11 12 13 14 15 16 |
# File 'lib/capistrano/interactive/command.rb', line 9 def to_cmd [ :ssh, *ssh_cmd_args, @host.hostname, %Q{'$SHELL -l -c "#{@command.to_command}"'} ].join(' ') end |