Class: GroongaQueryLog::Command::VerifyServer

Inherits:
Object
  • Object
show all
Defined in:
lib/groonga-query-log/command/verify-server.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeVerifyServer

Returns a new instance of VerifyServer.



27
28
29
30
# File 'lib/groonga-query-log/command/verify-server.rb', line 27

def initialize
  @options = ServerVerifier::Options.new
  @n_executed_commands = 0
end

Instance Attribute Details

#n_executed_commandsObject (readonly)

Returns the value of attribute n_executed_commands.



26
27
28
# File 'lib/groonga-query-log/command/verify-server.rb', line 26

def n_executed_commands
  @n_executed_commands
end

Instance Method Details

#run(command_line, &callback) ⇒ Object



32
33
34
35
36
37
38
39
40
# File 'lib/groonga-query-log/command/verify-server.rb', line 32

def run(command_line, &callback)
  input_paths = create_parser.parse(command_line)
  verifier = ServerVerifier.new(@options)
  begin
    verify(verifier, input_paths, &callback)
  ensure
    @n_executed_commands = verifier.n_executed_commands
  end
end