Class: D2::FileDescriptor
- Inherits:
-
Object
- Object
- D2::FileDescriptor
- Defined in:
- lib/d2.rb
Instance Method Summary collapse
-
#write(cmd) ⇒ Object
Write out to the file descriptor to interact with the parent process (shell).
Instance Method Details
#write(cmd) ⇒ Object
Write out to the file descriptor to interact with the parent process (shell)
47 48 49 50 51 52 |
# File 'lib/d2.rb', line 47 def write(cmd) fd = IO.sysopen(@path, 'w') io = IO.new(fd) io.write("#{cmd}\n") io.close end |