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.
150 151 152 153 154 155 156 157 158 159 |
# File 'lib/groonga/client/command-line/groonga-client.rb', line 150 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
161 162 163 |
# File 'lib/groonga/client/command-line/groonga-client.rb', line 161 def <<(line) @parser << line end |
#finish ⇒ Object
165 166 167 |
# File 'lib/groonga/client/command-line/groonga-client.rb', line 165 def finish @parser.finish end |
#repl ⇒ Object
169 170 171 172 173 174 175 176 177 178 |
# File 'lib/groonga/client/command-line/groonga-client.rb', line 169 def repl begin require "readline" rescue LoadError repl = BareREPL.new(self) else repl = ReadlineREPL.new(self) repl_readline end end |