Class: RServiceBus::Saga_Data

Inherits:
Object
  • Object
show all
Defined in:
lib/rservicebus/Saga/Data.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(saga) ⇒ Saga_Data

Returns a new instance of Saga_Data.



8
9
10
11
12
13
14
15
# File 'lib/rservicebus/Saga/Data.rb', line 8

def initialize( saga )
    @createdAt = DateTime.now
    @correlationId = UUIDTools::UUID.random_create
    @sagaClassName = 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



17
18
19
# File 'lib/rservicebus/Saga/Data.rb', line 17

def method_missing(name, *args, &block)
    @hash.send(name, *args, &block)
end

Instance Attribute Details

#correlationIdObject (readonly)

Returns the value of attribute correlationId.



5
6
7
# File 'lib/rservicebus/Saga/Data.rb', line 5

def correlationId
  @correlationId
end

#finishedObject

Returns the value of attribute finished.



6
7
8
# File 'lib/rservicebus/Saga/Data.rb', line 6

def finished
  @finished
end

#sagaClassNameObject (readonly)

Returns the value of attribute sagaClassName.



5
6
7
# File 'lib/rservicebus/Saga/Data.rb', line 5

def sagaClassName
  @sagaClassName
end