Class: SSHKit::Command
- Inherits:
-
Object
- Object
- SSHKit::Command
- Defined in:
- lib/sshkit/sudo/command.rb
Instance Method Summary collapse
Instance Method Details
#with(&_block) ⇒ Object
7 8 9 10 11 12 |
# File 'lib/sshkit/sudo/command.rb', line 7 def with(&_block) return yield if [:user] env_string = environment_string return yield if env_string.empty? "( export #{env_string} ; #{yield} )" end |