Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
uoy-faculty-datasync / lib / datasync.rb
Size: Mime:
# 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