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.
96 97 98 99 100 101 102 103 104 105 106 107 |
# File 'lib/rflow/message.rb', line 96 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.
94 95 96 |
# File 'lib/rflow/message.rb', line 94 def completed_at @completed_at end |
#component_instance_uuid ⇒ Object (readonly)
Returns the value of attribute component_instance_uuid.
93 94 95 |
# File 'lib/rflow/message.rb', line 93 def component_instance_uuid @component_instance_uuid end |
#context ⇒ Object
Returns the value of attribute context.
94 95 96 |
# File 'lib/rflow/message.rb', line 94 def context @context end |
#started_at ⇒ Object (readonly)
Returns the value of attribute started_at.
93 94 95 |
# File 'lib/rflow/message.rb', line 93 def started_at @started_at end |
Instance Method Details
#to_hash ⇒ Object
109 110 111 112 113 114 115 116 |
# File 'lib/rflow/message.rb', line 109 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 |