Class: Aggkit::Watcher::Pipe

Inherits:
Object
  • Object
show all
Defined in:
lib/aggkit/watcher.rb

Instance Method Summary collapse

Constructor Details

#initializePipe

Returns a new instance of Pipe.



17
18
19
# File 'lib/aggkit/watcher.rb', line 17

def initialize
  @read, @write = IO.pipe
end

Instance Method Details

#getsObject



25
26
27
# File 'lib/aggkit/watcher.rb', line 25

def gets
  @read.gets.strip.to_sym
end

#puts(str) ⇒ Object



21
22
23
# File 'lib/aggkit/watcher.rb', line 21

def puts(str)
  @write.puts str.to_s
end