Class: Akasha::RecordedEvent

Inherits:
Event
  • Object
show all
Defined in:
lib/akasha/recorded_event.rb

Overview

Event read from a stream.

Instance Attribute Summary collapse

Attributes inherited from Event

#data, #id, #metadata, #name

Instance Method Summary collapse

Methods inherited from Event

#with_metadata

Constructor Details

#initialize(name, id, revision, updated_at, metadata, **data) ⇒ RecordedEvent

Returns a new instance of RecordedEvent.



8
9
10
11
12
# File 'lib/akasha/recorded_event.rb', line 8

def initialize(name, id, revision, updated_at, , **data)
  super(name, id, , **data)
  @revision = revision
  @updated_at = updated_at
end

Instance Attribute Details

#revisionObject (readonly)

Returns the value of attribute revision.



6
7
8
# File 'lib/akasha/recorded_event.rb', line 6

def revision
  @revision
end

#updated_atObject (readonly)

Returns the value of attribute updated_at.



6
7
8
# File 'lib/akasha/recorded_event.rb', line 6

def updated_at
  @updated_at
end

Instance Method Details

#==(other) ⇒ Object



14
15
16
17
18
# File 'lib/akasha/recorded_event.rb', line 14

def ==(other)
  super(other) &&
    @revision == other.revision &&
    @updated_at.utc.iso8601 == other.updated_at.utc.iso8601
end