class ApplicationInterface
Public Class Methods
new(pty_m)
click to toggle source
# File lib/server/application_interface.rb, line 4 def initialize pty_m @pty_m = pty_m @queue = Queue.new start_worker end
Public Instance Methods
push(key)
click to toggle source
# File lib/server/application_interface.rb, line 10 def push key @queue << key end
Also aliased as: <<
start_worker()
click to toggle source
# File lib/server/application_interface.rb, line 15 def start_worker Thread.new do loop { @pty_m << @queue.pop } end end