Module: EntitySnapshot::EventStore::Controls::Entity::Example::Transformer

Defined in:
lib/entity_snapshot/event_store/controls/entity.rb

Class Method Summary collapse

Class Method Details

.instance(raw_data) ⇒ Object



19
20
21
# File 'lib/entity_snapshot/event_store/controls/entity.rb', line 19

def self.instance(raw_data)
  Example.build(raw_data)
end

.raw_data(instance) ⇒ Object



15
16
17
# File 'lib/entity_snapshot/event_store/controls/entity.rb', line 15

def self.raw_data(instance)
  instance.to_h
end