Class: Microsandbox::ExecStdin
- Inherits:
-
Object
- Object
- Microsandbox::ExecStdin
- Defined in:
- lib/microsandbox/exec_handle.rb
Overview
A writer for a streamed process’s stdin, from Microsandbox::ExecHandle#stdin.
Instance Method Summary collapse
-
#close ⇒ nil
Send EOF.
-
#initialize(native) ⇒ ExecStdin
constructor
A new instance of ExecStdin.
-
#write(data) ⇒ self
Write data to the process stdin.
Constructor Details
#initialize(native) ⇒ ExecStdin
Returns a new instance of ExecStdin.
60 61 62 |
# File 'lib/microsandbox/exec_handle.rb', line 60 def initialize(native) @native = native end |
Instance Method Details
#close ⇒ nil
Send EOF.
73 74 75 76 |
# File 'lib/microsandbox/exec_handle.rb', line 73 def close @native.close nil end |
#write(data) ⇒ self
Write data to the process stdin.
66 67 68 69 |
# File 'lib/microsandbox/exec_handle.rb', line 66 def write(data) @native.write(data.to_s) self end |