Class: LcpRuby::Dsl::DslLoader::WorkflowEvalContext
- Inherits:
-
Object
- Object
- LcpRuby::Dsl::DslLoader::WorkflowEvalContext
- Defined in:
- lib/lcp_ruby/dsl/dsl_loader.rb
Overview
Isolated evaluation context for workflow DSL files.
Instance Attribute Summary collapse
-
#workflow_definitions ⇒ Object
readonly
Returns the value of attribute workflow_definitions.
Instance Method Summary collapse
- #define_workflow(name, &block) ⇒ Object
-
#initialize ⇒ WorkflowEvalContext
constructor
A new instance of WorkflowEvalContext.
Constructor Details
#initialize ⇒ WorkflowEvalContext
Returns a new instance of WorkflowEvalContext.
321 322 323 |
# File 'lib/lcp_ruby/dsl/dsl_loader.rb', line 321 def initialize @workflow_definitions = [] end |
Instance Attribute Details
#workflow_definitions ⇒ Object (readonly)
Returns the value of attribute workflow_definitions.
319 320 321 |
# File 'lib/lcp_ruby/dsl/dsl_loader.rb', line 319 def workflow_definitions @workflow_definitions end |
Instance Method Details
#define_workflow(name, &block) ⇒ Object
325 326 327 328 329 330 |
# File 'lib/lcp_ruby/dsl/dsl_loader.rb', line 325 def define_workflow(name, &block) builder = WorkflowBuilder.new(name) builder.instance_eval(&block) hash = builder.to_hash @workflow_definitions << Workflow::WorkflowDefinition.from_hash(hash) end |