Class: Groonga::Client::CommandLine::GroongaClientIndexCheck

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

Defined Under Namespace

Classes: Checker

Instance Method Summary collapse

Constructor Details

#initializeGroongaClientIndexCheck

Returns a new instance of GroongaClientIndexCheck.



26
27
28
29
# File 'lib/groonga/client/command-line/groonga-client-index-check.rb', line 26

def initialize
  @available_methods = [:source, :content]
  @methods = []
end

Instance Method Details

#run(arguments) ⇒ Object



31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# File 'lib/groonga/client/command-line/groonga-client-index-check.rb', line 31

def run(arguments)
  parser = Parser.new
  target_names = parser.parse(arguments) do |option_parser|
    parse_command_line(option_parser)
  end

  if @methods.empty?
    @methods = @available_methods
  end

  parser.open_client do |client|
    checker = Checker.new(client, @methods, target_names)
    checker.run
  end
end