Class: ScriptCore::ServiceChannel
- Defined in:
- lib/script_core/service_channel.rb
Instance Attribute Summary collapse
-
#in_writer ⇒ Object
readonly
Returns the value of attribute in_writer.
-
#out_reader ⇒ Object
readonly
Returns the value of attribute out_reader.
Instance Method Summary collapse
-
#initialize(in_writer, out_reader) ⇒ ServiceChannel
constructor
A new instance of ServiceChannel.
- #read(*args) ⇒ Object
- #write(buffer) ⇒ Object
Constructor Details
#initialize(in_writer, out_reader) ⇒ ServiceChannel
Returns a new instance of ServiceChannel.
7 8 9 10 |
# File 'lib/script_core/service_channel.rb', line 7 def initialize(in_writer, out_reader) @in_writer = in_writer @out_reader = out_reader end |
Instance Attribute Details
#in_writer ⇒ Object (readonly)
Returns the value of attribute in_writer.
5 6 7 |
# File 'lib/script_core/service_channel.rb', line 5 def in_writer @in_writer end |
#out_reader ⇒ Object (readonly)
Returns the value of attribute out_reader.
5 6 7 |
# File 'lib/script_core/service_channel.rb', line 5 def out_reader @out_reader end |
Instance Method Details
#read(*args) ⇒ Object
19 20 21 |
# File 'lib/script_core/service_channel.rb', line 19 def read(*args) out_reader.read(*args) end |
#write(buffer) ⇒ Object
12 13 14 15 16 17 |
# File 'lib/script_core/service_channel.rb', line 12 def write(buffer) in_writer.write(buffer) nil rescue Errno::EPIPE nil end |