Class: Async::Matrix::ApplicationService::Transaction
- Inherits:
-
Object
- Object
- Async::Matrix::ApplicationService::Transaction
- Defined in:
- lib/async/matrix/application_service/transaction.rb
Instance Attribute Summary collapse
-
#ephemeral ⇒ Object
readonly
Returns the value of attribute ephemeral.
-
#events ⇒ Object
readonly
Returns the value of attribute events.
Instance Method Summary collapse
-
#initialize(data) ⇒ Transaction
constructor
A new instance of Transaction.
Constructor Details
#initialize(data) ⇒ Transaction
Returns a new instance of Transaction.
15 16 17 18 |
# File 'lib/async/matrix/application_service/transaction.rb', line 15 def initialize(data) @events = (data["events"] || []).map { |e| Schema.parse(e) } @ephemeral = (data["de.sorunome.msc2409.ephemeral"] || data["ephemeral"] || []).map { |e| Schema.parse(e) } end |
Instance Attribute Details
#ephemeral ⇒ Object (readonly)
Returns the value of attribute ephemeral.
13 14 15 |
# File 'lib/async/matrix/application_service/transaction.rb', line 13 def ephemeral @ephemeral end |
#events ⇒ Object (readonly)
Returns the value of attribute events.
13 14 15 |
# File 'lib/async/matrix/application_service/transaction.rb', line 13 def events @events end |