Class: Gitlab::EventStore::Event

Inherits:
Object
  • Object
show all
Defined in:
lib/gitlab/event_store/event.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data:) ⇒ Event

Returns a new instance of Event.


32
33
34
35
# File 'lib/gitlab/event_store/event.rb', line 32

def initialize(data:)
  validate_schema!(data)
  @data = data
end

Instance Attribute Details

#dataObject (readonly)

Returns the value of attribute data.


30
31
32
# File 'lib/gitlab/event_store/event.rb', line 30

def data
  @data
end

Instance Method Details

#schemaObject

Raises:

  • (NotImplementedError)

37
38
39
# File 'lib/gitlab/event_store/event.rb', line 37

def schema
  raise NotImplementedError, 'must specify schema to validate the event'
end