Class: RemoteRuby::ConnectionAdapter

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

Overview

Base class for other 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.


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

def initialize(**args); end

Instance Method Details

#connection_nameObject

This will be displayed as a prefix when adapter writes something to emulated standard output or standard error. May be overriden in a child class.


11
12
13
# File 'lib/remote_ruby/connection_adapter.rb', line 11

def connection_name
  self.class.name
end

#open(_code) ⇒ Object

Override in child class. Receives Ruby code as string and yields two readable streams: for emulated standard output and standard error.

Raises:

  • (NotImplementedError)

17
18
19
# File 'lib/remote_ruby/connection_adapter.rb', line 17

def open(_code)
  raise NotImplementedError
end