Class: Groonga::Client::CommandLine::GroongaClient::Runner

Inherits:
Object
  • Object
show all
Defined in:
lib/groonga/client/command-line/groonga-client.rb

Instance Method Summary collapse

Constructor Details

#initialize(client, options = {}) ⇒ Runner

Returns a new instance of Runner.



177
178
179
180
181
182
183
184
185
186
# File 'lib/groonga/client/command-line/groonga-client.rb', line 177

def initialize(client, options={})
  @client = client
  @split_load_chunk_size = options[:split_load_chunk_size] || 10000
  @generate_request_id   = options[:generate_request_id]
  @target_commands       = options[:target_commands]
  @target_tables         = options[:target_tables]
  @target_columns        = options[:target_columns]
  @load_values = []
  @parser = create_command_parser
end

Instance Method Details

#<<(line) ⇒ Object



188
189
190
# File 'lib/groonga/client/command-line/groonga-client.rb', line 188

def <<(line)
  @parser << line
end

#finishObject



192
193
194
# File 'lib/groonga/client/command-line/groonga-client.rb', line 192

def finish
  @parser.finish
end

#replObject



196
197
198
199
200
201
202
203
204
205
# File 'lib/groonga/client/command-line/groonga-client.rb', line 196

def repl
  begin
    require "readline"
  rescue LoadError
    repl = BareREPL.new(self)
  else
    repl = ReadlineREPL.new(self)
    repl_readline
  end
end