Class: RemoteRuby::ConnectionAdapter
- Inherits:
-
Object
- Object
- RemoteRuby::ConnectionAdapter
- Defined in:
- lib/remote_ruby/connection_adapter.rb
Overview
Base class for connection adapters.
Direct Known Subclasses
CacheAdapter, CachingAdapter, SSHAdapter, TextModeAdapter, TmpFileAdapter
Instance Method Summary collapse
- #connection_name ⇒ Object
-
#initialize(**args) ⇒ ConnectionAdapter
constructor
Initializers of adapters should receive only keyword arguments.
-
#open(_code, _stdin, _stdout, _stderr) ⇒ Object
Override in child class.
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_name ⇒ Object
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.
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 |