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.
57 58 59 |
# File 'lib/microsandbox/exec_handle.rb', line 57 def initialize(native) @native = native end |
Instance Method Details
#close ⇒ nil
Send EOF.
70 71 72 73 |
# File 'lib/microsandbox/exec_handle.rb', line 70 def close @native.close nil end |
#write(data) ⇒ self
Write data to the process stdin.
63 64 65 66 |
# File 'lib/microsandbox/exec_handle.rb', line 63 def write(data) @native.write(data.to_s) self end |