Method: TableSync::Publishing::Batch#initialize
- Defined in:
- lib/table_sync/publishing/batch.rb
#initialize(attrs = {}) ⇒ Batch
Returns a new instance of Batch.
11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/table_sync/publishing/batch.rb', line 11 def initialize(attrs = {}) attrs = attrs.with_indifferent_access self.object_class = attrs[:object_class] self.original_attributes = attrs[:original_attributes] self.custom_version = attrs[:custom_version] self.routing_key = attrs[:routing_key] self.headers = attrs[:headers] self.event = attrs.fetch(:event, :update).to_sym validate_required_attributes! end |