Class: ElasticsearchMysqlImporter::Importer

Inherits:
Object
  • Object
show all
Defined in:
lib/elasticsearch_mysql_importer/importer.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#output_fileObject

Returns the value of attribute output_file.



10
11
12
# File 'lib/elasticsearch_mysql_importer/importer.rb', line 10

def output_file
  @output_file
end

Instance Method Details

#configure {|@configuration| ... } ⇒ Object

Yields:

  • (@configuration)


12
13
14
15
16
# File 'lib/elasticsearch_mysql_importer/importer.rb', line 12

def configure
  @configuration ||= Configuration.new
  yield(@configuration) if block_given?
  validate_configuration
end

#write_fileObject



18
19
20
21
22
23
# File 'lib/elasticsearch_mysql_importer/importer.rb', line 18

def write_file
  if @configuration.output_file.nil?
    raise "Missing Configuration: 'output_file' is required."
  end
  create_import_file
end