Sha256: b59dc74b3053312676b7406c2f466e4addf3fefa8d723d883281f1a268fb546a
Contents?: true
Size: 533 Bytes
Versions: 16
Compression:
Stored size: 533 Bytes
Contents
# frozen_string_literal: true module TableSync module DSL def inherited(klass) klass.instance_variable_set(:@configs, configs.deep_dup) super end def configs @configs ||= Hash.new { |hash, key| hash[key] = [] } end def receive(source, to_table:, events: nil, &block) config = ::TableSync::Config.new( model: TableSync.orm.model.new(to_table), events: events, ) config.instance_exec(&block) if block configs[source.to_s] << config end end end
Version data entries
16 entries across 16 versions & 1 rubygems