Class: RFlow::Message::ProcessingEvent
- Inherits:
-
Object
- Object
- RFlow::Message::ProcessingEvent
- Defined in:
- lib/rflow/message.rb
Instance Attribute Summary collapse
-
#completed_at ⇒ Object
Returns the value of attribute completed_at.
-
#component_instance_uuid ⇒ Object
readonly
Returns the value of attribute component_instance_uuid.
-
#context ⇒ Object
Returns the value of attribute context.
-
#started_at ⇒ Object
readonly
Returns the value of attribute started_at.
Instance Method Summary collapse
-
#initialize(component_instance_uuid, started_at = nil, completed_at = nil, context = nil) ⇒ ProcessingEvent
constructor
A new instance of ProcessingEvent.
- #to_hash ⇒ Object
Constructor Details
#initialize(component_instance_uuid, started_at = nil, completed_at = nil, context = nil) ⇒ ProcessingEvent
Returns a new instance of ProcessingEvent.
106 107 108 109 110 111 112 113 114 115 116 117 |
# File 'lib/rflow/message.rb', line 106 def initialize(component_instance_uuid, started_at = nil, completed_at = nil, context = nil) @component_instance_uuid = component_instance_uuid @started_at = case started_at when String; Time.xmlschema(started_at) when Time; started_at else nil; end @completed_at = case completed_at when String; Time.xmlschema(completed_at) when Time; completed_at else nil; end @context = context end |
Instance Attribute Details
#completed_at ⇒ Object
Returns the value of attribute completed_at.
104 105 106 |
# File 'lib/rflow/message.rb', line 104 def completed_at @completed_at end |
#component_instance_uuid ⇒ Object (readonly)
Returns the value of attribute component_instance_uuid.
103 104 105 |
# File 'lib/rflow/message.rb', line 103 def component_instance_uuid @component_instance_uuid end |
#context ⇒ Object
Returns the value of attribute context.
104 105 106 |
# File 'lib/rflow/message.rb', line 104 def context @context end |
#started_at ⇒ Object (readonly)
Returns the value of attribute started_at.
103 104 105 |
# File 'lib/rflow/message.rb', line 103 def started_at @started_at end |
Instance Method Details
#to_hash ⇒ Object
119 120 121 122 123 124 125 126 |
# File 'lib/rflow/message.rb', line 119 def to_hash { 'component_instance_uuid' => component_instance_uuid.to_s, 'started_at' => started_at ? started_at.xmlschema(6) : nil, 'completed_at' => completed_at ? completed_at.xmlschema(6) : nil, 'context' => context ? context.to_s : nil, } end |