Class: EntityStore::EventDataObject

Inherits:
Object
  • Object
show all
Defined in:
lib/entity_store/event_data_object.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attrs = {}) ⇒ EventDataObject

Returns a new instance of EventDataObject.



5
6
7
# File 'lib/entity_store/event_data_object.rb', line 5

def initialize(attrs={})
  @attrs = attrs
end

Instance Attribute Details

#attrsObject (readonly)

Returns the value of attribute attrs.



3
4
5
# File 'lib/entity_store/event_data_object.rb', line 3

def attrs
  @attrs
end

Instance Method Details

#[](key) ⇒ Object



21
22
23
# File 'lib/entity_store/event_data_object.rb', line 21

def [](key)
  attrs[key]
end

#entity_typeObject



13
14
15
# File 'lib/entity_store/event_data_object.rb', line 13

def entity_type
  attrs['_entity_type']
end

#idObject



9
10
11
# File 'lib/entity_store/event_data_object.rb', line 9

def id
  attrs['_id'].to_s
end

#typeObject



17
18
19
# File 'lib/entity_store/event_data_object.rb', line 17

def type
  attrs['_type']
end