Class: Jisota::SSHEngine
- Inherits:
-
Object
- Object
- Jisota::SSHEngine
- Defined in:
- lib/jisota/ssh_engine.rb
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ SSHEngine
constructor
A new instance of SSHEngine.
- #start(user:, host:, **options) ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ SSHEngine
Returns a new instance of SSHEngine.
5 6 7 |
# File 'lib/jisota/ssh_engine.rb', line 5 def initialize( = {}) @engine = .fetch(:engine) { Net::SSH } end |
Instance Method Details
#start(user:, host:, **options) ⇒ Object
9 10 11 12 13 |
# File 'lib/jisota/ssh_engine.rb', line 9 def start(user: , host: , **) @engine.start(host, user, ) do |ssh_session| yield SSHSession.new(ssh_session) end end |