Class: Synqa::BaseSshScp
- Inherits:
-
Object
- Object
- Synqa::BaseSshScp
- Defined in:
- lib/synqa.rb
Overview
Base SSH/SCP implementation
Direct Known Subclasses
Instance Attribute Summary collapse
-
#host ⇒ Object
readonly
Returns the value of attribute host.
-
#user ⇒ Object
readonly
Returns the value of attribute user.
-
#userAtHost ⇒ Object
readonly
Returns the value of attribute userAtHost.
Instance Method Summary collapse
- #close ⇒ Object
-
#deleteDirectory(dirPath, dryRun) ⇒ Object
delete remote directory (if dryRun is false) using “rm -r”.
-
#deleteFile(filePath, dryRun) ⇒ Object
delete remote file (if dryRun is false) using “rm”.
- #setUserAtHost(userAtHost) ⇒ Object
Instance Attribute Details
#host ⇒ Object (readonly)
Returns the value of attribute host.
199 200 201 |
# File 'lib/synqa.rb', line 199 def host @host end |
#user ⇒ Object (readonly)
Returns the value of attribute user.
199 200 201 |
# File 'lib/synqa.rb', line 199 def user @user end |
#userAtHost ⇒ Object (readonly)
Returns the value of attribute userAtHost.
199 200 201 |
# File 'lib/synqa.rb', line 199 def userAtHost @userAtHost end |
Instance Method Details
#close ⇒ Object
206 207 208 |
# File 'lib/synqa.rb', line 206 def close # by default do nothing - close any cached connections end |
#deleteDirectory(dirPath, dryRun) ⇒ Object
delete remote directory (if dryRun is false) using “rm -r”
211 212 213 |
# File 'lib/synqa.rb', line 211 def deleteDirectory(dirPath, dryRun) ssh("rm -r #{dirPath}", dryRun) end |
#deleteFile(filePath, dryRun) ⇒ Object
delete remote file (if dryRun is false) using “rm”
216 217 218 |
# File 'lib/synqa.rb', line 216 def deleteFile(filePath, dryRun) ssh("rm #{filePath}", dryRun) end |
#setUserAtHost(userAtHost) ⇒ Object
201 202 203 204 |
# File 'lib/synqa.rb', line 201 def setUserAtHost(userAtHost) @userAtHost = userAtHost @user, @host = @userAtHost.split("@") end |