Class: Temporal::Metadata::Workflow
- Defined in:
- lib/temporal/metadata/workflow.rb
Instance Attribute Summary collapse
-
#attempt ⇒ Object
readonly
Returns the value of attribute attempt.
-
#headers ⇒ Object
readonly
Returns the value of attribute headers.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#run_id ⇒ Object
readonly
Returns the value of attribute run_id.
Instance Method Summary collapse
-
#initialize(name:, run_id:, attempt:, headers: {}) ⇒ Workflow
constructor
A new instance of Workflow.
- #to_h ⇒ Object
- #workflow? ⇒ Boolean
Methods inherited from Base
Constructor Details
#initialize(name:, run_id:, attempt:, headers: {}) ⇒ Workflow
Returns a new instance of Workflow.
8 9 10 11 12 13 14 15 |
# File 'lib/temporal/metadata/workflow.rb', line 8 def initialize(name:, run_id:, attempt:, headers: {}) @name = name @run_id = run_id @attempt = attempt @headers = headers freeze end |
Instance Attribute Details
#attempt ⇒ Object (readonly)
Returns the value of attribute attempt.
6 7 8 |
# File 'lib/temporal/metadata/workflow.rb', line 6 def attempt @attempt end |
#headers ⇒ Object (readonly)
Returns the value of attribute headers.
6 7 8 |
# File 'lib/temporal/metadata/workflow.rb', line 6 def headers @headers end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
6 7 8 |
# File 'lib/temporal/metadata/workflow.rb', line 6 def name @name end |
#run_id ⇒ Object (readonly)
Returns the value of attribute run_id.
6 7 8 |
# File 'lib/temporal/metadata/workflow.rb', line 6 def run_id @run_id end |
Instance Method Details
#to_h ⇒ Object
21 22 23 24 25 26 27 |
# File 'lib/temporal/metadata/workflow.rb', line 21 def to_h { 'workflow_name' => name, 'workflow_run_id' => run_id, 'attempt' => attempt } end |
#workflow? ⇒ Boolean
17 18 19 |
# File 'lib/temporal/metadata/workflow.rb', line 17 def workflow? true end |