Class: TableSync::Publishing::Data::Objects

Inherits:
Object
  • Object
show all
Defined in:
lib/table_sync/publishing/data/objects.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(objects:, event:) ⇒ Objects

Returns a new instance of Objects.



7
8
9
10
# File 'lib/table_sync/publishing/data/objects.rb', line 7

def initialize(objects:, event:)
  @objects = objects
  @event   = TableSync::Event.new(event)
end

Instance Attribute Details

#eventObject (readonly)

Returns the value of attribute event.



5
6
7
# File 'lib/table_sync/publishing/data/objects.rb', line 5

def event
  @event
end

#objectsObject (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

#constructObject



12
13
14
15
16
17
18
19
20
# File 'lib/table_sync/publishing/data/objects.rb', line 12

def construct
  {
    model: model,
    attributes: attributes_for_sync,
    version: version,
    event: event.resolve,
    metadata: event.,
  }
end