class Relaxo::QueryServer::DebugShell

Public Class Methods

new(log, wrapper) click to toggle source
# File lib/relaxo/query_server/shell.rb, line 64
def initialize(log, wrapper)
        @log = log
        @wrapper = wrapper
end

Public Instance Methods

run() { |command| ... } click to toggle source

Read commands from ‘input`, execute them and then write out the results.

# File lib/relaxo/query_server/shell.rb, line 70
def run
        @wrapper.run do |command|
                @log.puts "-> #{command.inspect}"
                
                result = yield command
                
                @log.puts "<- #{result.inspect}"
                
                next result
        end
end