Class: Groonga::Client::CommandLine::GroongaClient::Runner
- Inherits:
-
Object
- Object
- Groonga::Client::CommandLine::GroongaClient::Runner
- Defined in:
- lib/groonga/client/command-line/groonga-client.rb
Instance Method Summary collapse
- #<<(line) ⇒ Object
- #finish ⇒ Object
-
#initialize(client, options = {}) ⇒ Runner
constructor
A new instance of Runner.
- #repl ⇒ Object
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, ={}) @client = client @split_load_chunk_size = [:split_load_chunk_size] || 10000 @generate_request_id = [:generate_request_id] @target_commands = [:target_commands] @target_tables = [:target_tables] @target_columns = [: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 |
#finish ⇒ Object
192 193 194 |
# File 'lib/groonga/client/command-line/groonga-client.rb', line 192 def finish @parser.finish end |
#repl ⇒ Object
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 |