class Hasta::Mapper

A wrapper for instantiating a mapper from a definition file and invoking it

Attributes

mapper_file[R]

Public Class Methods

new(mapper_file) click to toggle source
# File lib/hasta/mapper.rb, line 12
def initialize(mapper_file)
  @mapper_file = mapper_file
end

Public Instance Methods

map(execution_context, data_sources, data_sink = InMemoryDataSink.new('Mapper Output')) click to toggle source
# File lib/hasta/mapper.rb, line 16
def map(execution_context, data_sources, data_sink = InMemoryDataSink.new('Mapper Output'))
  Hasta.logger.debug "Starting mapper: #{mapper_file}"

  data_source = CombinedDataSource.new(data_sources)
  execution_context.execute(mapper_file, data_source, data_sink)
end