Class: Conductor::Worker::Events::WorkflowEvent

Inherits:
ConductorEvent show all
Defined in:
lib/conductor/worker/events/workflow_events.rb

Direct Known Subclasses

WorkflowInputSize, WorkflowStartError

Instance Attribute Summary collapse

Attributes inherited from ConductorEvent

#timestamp

Instance Method Summary collapse

Constructor Details

#initialize(workflow_type:, version: nil) ⇒ WorkflowEvent

Returns a new instance of WorkflowEvent.



11
12
13
14
15
# File 'lib/conductor/worker/events/workflow_events.rb', line 11

def initialize(workflow_type:, version: nil)
  super()
  @workflow_type = workflow_type
  @version = version
end

Instance Attribute Details

#versionObject (readonly)

Returns the value of attribute version.



9
10
11
# File 'lib/conductor/worker/events/workflow_events.rb', line 9

def version
  @version
end

#workflow_typeObject (readonly)

Returns the value of attribute workflow_type.



9
10
11
# File 'lib/conductor/worker/events/workflow_events.rb', line 9

def workflow_type
  @workflow_type
end

Instance Method Details

#to_hObject



17
18
19
# File 'lib/conductor/worker/events/workflow_events.rb', line 17

def to_h
  super.merge(workflow_type: @workflow_type, version: @version)
end