Class: TableSync::Publishing::Data::Objects
- Inherits:
-
Object
- Object
- TableSync::Publishing::Data::Objects
- Defined in:
- lib/table_sync/publishing/data/objects.rb
Instance Attribute Summary collapse
-
#custom_version ⇒ Object
readonly
Returns the value of attribute custom_version.
-
#event ⇒ Object
readonly
Returns the value of attribute event.
-
#objects ⇒ Object
readonly
Returns the value of attribute objects.
Instance Method Summary collapse
- #construct ⇒ Object
-
#initialize(objects:, event:, custom_version:) ⇒ Objects
constructor
A new instance of Objects.
Constructor Details
#initialize(objects:, event:, custom_version:) ⇒ Objects
Returns a new instance of Objects.
7 8 9 10 11 |
# File 'lib/table_sync/publishing/data/objects.rb', line 7 def initialize(objects:, event:, custom_version:) @objects = objects @event = TableSync::Event.new(event) @custom_version = custom_version end |
Instance Attribute Details
#custom_version ⇒ Object (readonly)
Returns the value of attribute custom_version.
5 6 7 |
# File 'lib/table_sync/publishing/data/objects.rb', line 5 def custom_version @custom_version end |
#event ⇒ Object (readonly)
Returns the value of attribute event.
5 6 7 |
# File 'lib/table_sync/publishing/data/objects.rb', line 5 def event @event end |
#objects ⇒ Object (readonly)
Returns the value of attribute objects.
5 6 7 |
# File 'lib/table_sync/publishing/data/objects.rb', line 5 def objects @objects end |
Instance Method Details
#construct ⇒ Object
13 14 15 16 17 18 19 20 21 |
# File 'lib/table_sync/publishing/data/objects.rb', line 13 def construct { model:, attributes: attributes_for_sync, version: custom_version || version, event: event.resolve, metadata: event., } end |