Class: GroongaQueryLog::Command::Replay
- Inherits:
-
Object
- Object
- GroongaQueryLog::Command::Replay
- Defined in:
- lib/groonga-query-log/command/replay.rb
Instance Method Summary collapse
-
#initialize ⇒ Replay
constructor
A new instance of Replay.
- #run(command_line) ⇒ Object
Constructor Details
#initialize ⇒ Replay
Returns a new instance of Replay.
25 26 27 |
# File 'lib/groonga-query-log/command/replay.rb', line 25 def initialize = Replayer::Options.new end |
Instance Method Details
#run(command_line) ⇒ Object
29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/groonga-query-log/command/replay.rb', line 29 def run(command_line) input_paths = create_parser.parse(command_line) replayer = Replayer.new() if input_paths.empty? replayer.replay($stdin) else input_paths.each do |input_path| File.open(input_path) do |input| replayer.replay(input) end end end true end |