Class: Groonga::QueryLog::Command::VerifyServer
- Inherits:
-
Object
- Object
- Groonga::QueryLog::Command::VerifyServer
- Defined in:
- lib/groonga/query-log/command/verify-server.rb
Instance Method Summary collapse
-
#initialize ⇒ VerifyServer
constructor
A new instance of VerifyServer.
- #run(command_line) ⇒ Object
Constructor Details
#initialize ⇒ VerifyServer
Returns a new instance of VerifyServer.
27 28 29 |
# File 'lib/groonga/query-log/command/verify-server.rb', line 27 def initialize @options = ServerVerifier::Options.new end |
Instance Method Details
#run(command_line) ⇒ Object
31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
# File 'lib/groonga/query-log/command/verify-server.rb', line 31 def run(command_line) input_paths = create_parser.parse(command_line) verifier = ServerVerifier.new(@options) if input_paths.empty? verifier.verify($stdin) else input_paths.each do |input_path| File.open(input_path) do |input| verifier.verify(input) end end end true end |