class Relaxo::QueryServer::MockShell

Used primarily for testing, allows the input and output of the server to be provided directly.

Public Class Methods

new() click to toggle source
Calls superclass method Relaxo::QueryServer::Shell::new
# File lib/relaxo/query_server/shell.rb, line 85
def initialize
        super [], []
end

Public Instance Methods

read_object() click to toggle source
# File lib/relaxo/query_server/shell.rb, line 89
def read_object
        if @input.size > 0
                @input.shift
        else
                raise EOFError.new("No more objects")
        end
end
write_object(object) click to toggle source
# File lib/relaxo/query_server/shell.rb, line 97
def write_object object
        @output << object
end