Repository URL to install this package:
|
Version:
1.1.0 ▾
|
# frozen_string_literal: true
require 'datasync/version'
require 'datasync/link_classifier'
require 'datasync/dsl'
require 'datasync/implicit_mapper'
require 'datasync/target_link_mapper'
require 'datasync/source_link_mapper'
require 'datasync/link_table_mapper'
require 'datasync/sync_operation'
# Data synchronization module. Allows mappers to be created using DSL.
module Datasync
module_function
def create_mapper(map_class, &block)
raise ArgumentError, 'No block was given to initialize the mapping' unless block
mapper = map_class.new
DSL::MapperDSL.new(mapper).instance_eval(&block)
mapper.validate!
mapper
end
end