Class: TableSync::Publishing::Raw
- Inherits:
-
Object
- Object
- TableSync::Publishing::Raw
- Includes:
- Utils::RequiredValidator
- Defined in:
- lib/table_sync/publishing/raw.rb
Instance Attribute Summary collapse
-
#custom_version ⇒ Object
Returns the value of attribute custom_version.
-
#event ⇒ Object
Returns the value of attribute event.
-
#headers ⇒ Object
Returns the value of attribute headers.
-
#model_name ⇒ Object
Returns the value of attribute model_name.
-
#original_attributes ⇒ Object
Returns the value of attribute original_attributes.
-
#routing_key ⇒ Object
Returns the value of attribute routing_key.
-
#schema_name ⇒ Object
Returns the value of attribute schema_name.
-
#table_name ⇒ Object
Returns the value of attribute table_name.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ Raw
constructor
A new instance of Raw.
- #message ⇒ Object
- #publish_now ⇒ Object
Methods included from Utils::RequiredValidator
Constructor Details
#initialize(attributes = {}) ⇒ Raw
Returns a new instance of Raw.
15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/table_sync/publishing/raw.rb', line 15 def initialize(attributes = {}) attributes = attributes.with_indifferent_access self.model_name = attributes[:model_name] self.table_name = attributes[:table_name] self.schema_name = attributes[:schema_name] self.original_attributes = attributes[:original_attributes] self.custom_version = attributes[:custom_version] self.routing_key = attributes[:routing_key] self.headers = attributes[:headers] self.event = attributes.fetch(:event, :update).to_sym end |
Instance Attribute Details
#custom_version ⇒ Object
Returns the value of attribute custom_version.
6 7 8 |
# File 'lib/table_sync/publishing/raw.rb', line 6 def custom_version @custom_version end |
#event ⇒ Object
Returns the value of attribute event.
6 7 8 |
# File 'lib/table_sync/publishing/raw.rb', line 6 def event @event end |
#headers ⇒ Object
Returns the value of attribute headers.
6 7 8 |
# File 'lib/table_sync/publishing/raw.rb', line 6 def headers @headers end |
#model_name ⇒ Object
Returns the value of attribute model_name.
6 7 8 |
# File 'lib/table_sync/publishing/raw.rb', line 6 def model_name @model_name end |
#original_attributes ⇒ Object
Returns the value of attribute original_attributes.
6 7 8 |
# File 'lib/table_sync/publishing/raw.rb', line 6 def original_attributes @original_attributes end |
#routing_key ⇒ Object
Returns the value of attribute routing_key.
6 7 8 |
# File 'lib/table_sync/publishing/raw.rb', line 6 def routing_key @routing_key end |
#schema_name ⇒ Object
Returns the value of attribute schema_name.
6 7 8 |
# File 'lib/table_sync/publishing/raw.rb', line 6 def schema_name @schema_name end |
#table_name ⇒ Object
Returns the value of attribute table_name.
6 7 8 |
# File 'lib/table_sync/publishing/raw.rb', line 6 def table_name @table_name end |
Instance Method Details
#message ⇒ Object
34 35 36 |
# File 'lib/table_sync/publishing/raw.rb', line 34 def TableSync::Publishing::Message::Raw.new(attributes) end |
#publish_now ⇒ Object
30 31 32 |
# File 'lib/table_sync/publishing/raw.rb', line 30 def publish_now .publish end |