module EventStore::HTTP::MediaTypes::Events::Batch::Transformer
Public Class Methods
json()
click to toggle source
# File lib/event_store/http/media_types/events/batch.rb, line 24 def self.json JSON end
raw_data(instance)
click to toggle source
# File lib/event_store/http/media_types/events/batch.rb, line 28 def self.raw_data(instance) instance.events.map do |event| hash = { :event_id => event.id, :event_type => event.type, :data => event.data } hash[:metadata] = event.metadata if event.metadata hash end end