Module: EventStore::HTTP::Controls::ReadEvent::OutputSchema::Transformer

Defined in:
lib/event_store/http/controls/read_event/output_schema.rb

Defined Under Namespace

Modules: JSON

Class Method Summary collapse

Class Method Details

.instance(raw_data) ⇒ Object



24
25
26
27
28
29
30
31
# File 'lib/event_store/http/controls/read_event/output_schema.rb', line 24

def self.instance(raw_data)
  content = raw_data.fetch :content

  type = content.fetch :eventType
  data = Casing::Underscore.(content.fetch(:data))

  { :type => type, :data => data }
end

.jsonObject



20
21
22
# File 'lib/event_store/http/controls/read_event/output_schema.rb', line 20

def self.json
  JSON
end