Module: EventSource::EventData

Included in:
Read, Write
Defined in:
lib/event_source/event_data.rb,
lib/event_source/event_data/hash.rb,
lib/event_source/event_data/read.rb,
lib/event_source/event_data/write.rb

Defined Under Namespace

Classes: Hash, Read, Write

Class Method Summary collapse

Class Method Details

.included(cls) ⇒ Object



3
4
5
6
7
8
9
10
11
12
13
14
15
16
# File 'lib/event_source/event_data.rb', line 3

def self.included(cls)
  cls.class_exec do
    include Schema::DataStructure

    attribute :id, String
    attribute :type, String
    attribute :data
    attribute :metadata

    def ===(other)
      type == other
    end
  end
end