Class: Async::Matrix::ApplicationService::Event
- Inherits:
-
Object
- Object
- Async::Matrix::ApplicationService::Event
- Defined in:
- lib/async/matrix/application_service/event.rb
Instance Attribute Summary collapse
-
#content ⇒ Object
readonly
Returns the value of attribute content.
-
#event_id ⇒ Object
readonly
Returns the value of attribute event_id.
-
#room_id ⇒ Object
readonly
Returns the value of attribute room_id.
-
#sender ⇒ Object
readonly
Returns the value of attribute sender.
-
#state_key ⇒ Object
readonly
Returns the value of attribute state_key.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(data) ⇒ Event
constructor
A new instance of Event.
Constructor Details
#initialize(data) ⇒ Event
Returns a new instance of Event.
25 26 27 28 29 30 31 32 |
# File 'lib/async/matrix/application_service/event.rb', line 25 def initialize(data) @type = data["type"] @sender = data["sender"] @room_id = data["room_id"] @state_key = data["state_key"] @event_id = data["event_id"] @content = Content.new(data["content"] || {}) end |
Instance Attribute Details
#content ⇒ Object (readonly)
Returns the value of attribute content.
23 24 25 |
# File 'lib/async/matrix/application_service/event.rb', line 23 def content @content end |
#event_id ⇒ Object (readonly)
Returns the value of attribute event_id.
23 24 25 |
# File 'lib/async/matrix/application_service/event.rb', line 23 def event_id @event_id end |
#room_id ⇒ Object (readonly)
Returns the value of attribute room_id.
23 24 25 |
# File 'lib/async/matrix/application_service/event.rb', line 23 def room_id @room_id end |
#sender ⇒ Object (readonly)
Returns the value of attribute sender.
23 24 25 |
# File 'lib/async/matrix/application_service/event.rb', line 23 def sender @sender end |
#state_key ⇒ Object (readonly)
Returns the value of attribute state_key.
23 24 25 |
# File 'lib/async/matrix/application_service/event.rb', line 23 def state_key @state_key end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
23 24 25 |
# File 'lib/async/matrix/application_service/event.rb', line 23 def type @type end |