Class: RServiceBus2::SagaData
- Inherits:
-
Object
- Object
- RServiceBus2::SagaData
- Defined in:
- lib/rservicebus2/saga/data.rb
Overview
Saga Data
Instance Attribute Summary collapse
-
#correlation_id ⇒ Object
readonly
Returns the value of attribute correlation_id.
-
#finished ⇒ Object
Returns the value of attribute finished.
-
#saga_class_name ⇒ Object
readonly
Returns the value of attribute saga_class_name.
Instance Method Summary collapse
-
#initialize(saga) ⇒ SagaData
constructor
A new instance of SagaData.
- #method_missing(name, *args, &block) ⇒ Object
Constructor Details
#initialize(saga) ⇒ SagaData
Returns a new instance of SagaData.
7 8 9 10 11 12 13 14 |
# File 'lib/rservicebus2/saga/data.rb', line 7 def initialize(saga) @createdat = DateTime.now @correlation_id = UUIDTools::UUID.random_create @saga_class_name = saga.class.name @finished = false @hash = {} end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name, *args, &block) ⇒ Object
16 17 18 |
# File 'lib/rservicebus2/saga/data.rb', line 16 def method_missing(name, *args, &block) @hash.send(name, *args, &block) end |
Instance Attribute Details
#correlation_id ⇒ Object (readonly)
Returns the value of attribute correlation_id.
4 5 6 |
# File 'lib/rservicebus2/saga/data.rb', line 4 def correlation_id @correlation_id end |
#finished ⇒ Object
Returns the value of attribute finished.
5 6 7 |
# File 'lib/rservicebus2/saga/data.rb', line 5 def finished @finished end |
#saga_class_name ⇒ Object (readonly)
Returns the value of attribute saga_class_name.
4 5 6 |
# File 'lib/rservicebus2/saga/data.rb', line 4 def saga_class_name @saga_class_name end |