class RSwim::Pipe
Public Class Methods
new(q_in, q_out)
click to toggle source
# File lib/rswim/pipe.rb, line 9 def initialize(q_in, q_out) @q_in = q_in @q_out = q_out end
simple()
click to toggle source
# File lib/rswim/pipe.rb, line 5 def self.simple Simple.new end
Public Instance Methods
inbound()
click to toggle source
returns list of inputs. Empty if none have been received
# File lib/rswim/pipe.rb, line 19 def inbound Array.new(@q_in.size) { @q_in.pop }.tap(&:compact!) end
send(message)
click to toggle source
# File lib/rswim/pipe.rb, line 14 def send(message) @q_out << message end