lib/table_sync.rb in table_sync-6.0.4 vs lib/table_sync.rb in table_sync-6.1.0

- old
+ new

@@ -35,16 +35,17 @@ attr_accessor :single_publishing_job_class_callable attr_accessor :batch_publishing_job_class_callable attr_accessor :routing_key_callable attr_accessor :exchange_name attr_accessor :headers_callable - attr_accessor :notifier + attr_accessor :notify attr_reader :orm attr_reader :publishing_adapter attr_reader :receiving_model attr_reader :setup + attr_reader :notifier def sync(object_class, **options) setup.new( object_class: object_class, on: options[:on], @@ -67,8 +68,18 @@ else raise ORMNotSupported.new(val.inspect) end @orm = val + end + + def notifier=(value) + self.notify = true if notify.nil? + + @notifier = value + end + + def notify? + !!notify end end end