Class: Aggkit::Watcher::Pipe
- Inherits:
-
Object
- Object
- Aggkit::Watcher::Pipe
- Defined in:
- lib/aggkit/watcher.rb
Instance Method Summary collapse
- #gets ⇒ Object
-
#initialize ⇒ Pipe
constructor
A new instance of Pipe.
- #puts(str) ⇒ Object
Constructor Details
#initialize ⇒ Pipe
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
#gets ⇒ Object
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 |