Class: Groonga::Command::Parser::Command::GroongaCommandLogicalify
- Inherits:
-
Object
- Object
- Groonga::Command::Parser::Command::GroongaCommandLogicalify
- Defined in:
- lib/groonga/command/parser/command/groonga-command-logicalify.rb
Instance Method Summary collapse
-
#initialize ⇒ GroongaCommandLogicalify
constructor
A new instance of GroongaCommandLogicalify.
- #run(argv = ARGV) ⇒ Object
Constructor Details
#initialize ⇒ GroongaCommandLogicalify
Returns a new instance of GroongaCommandLogicalify.
26 27 28 29 |
# File 'lib/groonga/command/parser/command/groonga-command-logicalify.rb', line 26 def initialize @logical_table = nil @shard_key = nil end |
Instance Method Details
#run(argv = ARGV) ⇒ Object
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/groonga/command/parser/command/groonga-command-logicalify.rb', line 31 def run(argv=ARGV) begin (argv) rescue OptionParser::ParseError puts($!.) return false end input_paths = argv if input_paths.empty? logicalify($stdin) else input_paths.each do |input_path| File.open(input_path) do |input| logicalify(input) end end end true end |