Method: TableSync::BatchPublisher#initialize
- Defined in:
- lib/table_sync/batch_publisher.rb
#initialize(object_class, original_attributes_array, **options) ⇒ BatchPublisher
Returns a new instance of BatchPublisher.
4 5 6 7 8 9 10 11 12 13 14 15 |
# File 'lib/table_sync/batch_publisher.rb', line 4 def initialize(object_class, original_attributes_array, **) @original_attributes_array = original_attributes_array.map do |hash| filter_safe_for_serialization(hash.deep_symbolize_keys) end @object_class = object_class.constantize @confirm = [:confirm] || true @routing_key = [:routing_key] || resolve_routing_key @push_original_attributes = [:push_original_attributes] || false @headers = [:headers] @event = [:event] || :update end |