Class: RemoteRuby::ConnectionAdapter
- Inherits:
-
Object
- Object
- RemoteRuby::ConnectionAdapter
- Defined in:
- lib/remote_ruby/connection_adapter.rb
Overview
Base class for other connection adapters.
Direct Known Subclasses
CacheAdapter, CachingAdapter, EvalAdapter, StdinProcessAdapter
Instance Method Summary collapse
-
#connection_name ⇒ Object
This will be displayed as a prefix when adapter writes something to emulated standard output or standard error.
-
#initialize(**args) ⇒ ConnectionAdapter
constructor
Initializers of adapters should receive only keyword arguments.
-
#open(_code) ⇒ 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.
6 |
# File 'lib/remote_ruby/connection_adapter.rb', line 6 def initialize(**args); end |
Instance Method Details
#connection_name ⇒ Object
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.
17 18 19 |
# File 'lib/remote_ruby/connection_adapter.rb', line 17 def open(_code) raise NotImplementedError end |