Class: LcpRuby::Dsl::DslLoader::WorkflowEvalContext

Inherits:
Object
  • Object
show all
Defined in:
lib/lcp_ruby/dsl/dsl_loader.rb

Overview

Isolated evaluation context for workflow DSL files.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeWorkflowEvalContext

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_definitionsObject (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