Class: RemoteRuby::ConnectionAdapter

Inherits:
Object
  • Object
show all
Defined in:
lib/remote_ruby/connection_adapter.rb

Overview

Base class for connection adapters.

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ ConnectionAdapter

Initializers of adapters should receive only keyword arguments. May be overriden in a child class.



8
# File 'lib/remote_ruby/connection_adapter.rb', line 8

def initialize(**args); end

Instance Method Details

#connection_nameObject



20
21
22
# File 'lib/remote_ruby/connection_adapter.rb', line 20

def connection_name
  "#{self.class.name} "
end

#open(_code, _stdin, _stdout, _stderr) ⇒ Object

Override in child class. Accepts compiled Ruby code as string, readable IO for stdin, writable IO for stdout and stderr. Should return a binary result stream.

Raises:

  • (NotImplementedError)


14
15
16
17
18
# File 'lib/remote_ruby/connection_adapter.rb', line 14

def open(_code, _stdin, _stdout, _stderr)
  # :nocov:
  raise NotImplementedError
  # :nocov:
end