class WorkflowRb::WorkflowRegistry
Public Class Methods
new()
click to toggle source
# File lib/workflow_rb/services/workflow_registry.rb, line 5 def initialize @registry = [] end
Public Instance Methods
get_definition(id, version)
click to toggle source
# File lib/workflow_rb/services/workflow_registry.rb, line 9 def get_definition(id, version) @registry.each do |item| if (item.id == id) and (item.version == version) return item end end end
register_workflow(definition)
click to toggle source
# File lib/workflow_rb/services/workflow_registry.rb, line 18 def register_workflow(definition) @registry << definition end