Class: Groonga::TableDumper

Inherits:
Object
  • Object
show all
Defined in:
lib/groonga/dumper.rb

Instance Method Summary collapse

Constructor Details

#initialize(table, options = {}) ⇒ TableDumper

Returns a new instance of TableDumper



671
672
673
674
675
676
677
678
679
# File 'lib/groonga/dumper.rb', line 671

def initialize(table, options={})
  @table = table
  @options = options
  @output = @options[:output]
  @have_output = !@output.nil?
  @output ||= Dumper.default_output
  @error_output = @options[:error_output]
  @max_records = @options[:max_records]
end

Instance Method Details

#dumpObject



681
682
683
684
685
686
687
688
# File 'lib/groonga/dumper.rb', line 681

def dump
  dump_load_command
  if @have_output
    nil
  else
    @output.string
  end
end