Class: Relaxo::QueryServer::DebugShell
- Inherits:
-
Object
- Object
- Relaxo::QueryServer::DebugShell
- Defined in:
- lib/relaxo/query_server/shell.rb
Instance Method Summary collapse
-
#initialize(log, wrapper) ⇒ DebugShell
constructor
A new instance of DebugShell.
-
#run ⇒ Object
Read commands from
input, execute them and then write out the results.
Constructor Details
#initialize(log, wrapper) ⇒ DebugShell
Returns a new instance of DebugShell.
64 65 66 67 |
# File 'lib/relaxo/query_server/shell.rb', line 64 def initialize(log, wrapper) @log = log @wrapper = wrapper end |
Instance Method Details
#run ⇒ Object
Read commands from input, execute them and then write out the results.
70 71 72 73 74 75 76 77 78 79 80 |
# 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 |