Class: TableSync::Publishing::Params::Batch

Inherits:
Base
  • Object
show all
Defined in:
lib/table_sync/publishing/params/batch.rb

Constant Summary

Constants inherited from Base

TableSync::Publishing::Params::Base::DEFAULT_PARAMS

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#construct

Constructor Details

#initialize(attrs = {}) ⇒ Batch

Returns a new instance of Batch.



8
9
10
11
12
13
# File 'lib/table_sync/publishing/params/batch.rb', line 8

def initialize(attrs = {})
  self.object_class   = attrs[:object_class]
  @exchange_name      = attrs[:exchange_name]
  @routing_key        = attrs[:routing_key]
  @headers            = attrs[:headers]
end

Instance Attribute Details

#exchange_nameObject



15
16
17
# File 'lib/table_sync/publishing/params/batch.rb', line 15

def exchange_name
  @exchange_name || TableSync.exchange_name
end

#headersObject



23
24
25
# File 'lib/table_sync/publishing/params/batch.rb', line 23

def headers
  @headers || calculated_headers
end

#object_classObject

Returns the value of attribute object_class.



5
6
7
# File 'lib/table_sync/publishing/params/batch.rb', line 5

def object_class
  @object_class
end

#routing_keyObject



19
20
21
# File 'lib/table_sync/publishing/params/batch.rb', line 19

def routing_key
  @routing_key || calculated_routing_key
end