Module: LcpRuby::Workflow::Contract

Included in:
HostSource, ModelSource, Resolver, StaticSource
Defined in:
lib/lcp_ruby/workflow/contract.rb

Overview

Interface module that defines the contract for workflow sources. Included by StaticSource, ModelSource, and HostSource.

Instance Method Summary collapse

Instance Method Details

#workflow_by_name(name) ⇒ WorkflowDefinition?

Returns a single workflow definition by name.

Parameters:

  • name (String)

Returns:

Raises:

  • (NotImplementedError)


16
17
18
# File 'lib/lcp_ruby/workflow/contract.rb', line 16

def workflow_by_name(name)
  raise NotImplementedError, "#{self.class}#workflow_by_name must be implemented"
end

#workflows_for(model_name) ⇒ Array<WorkflowDefinition>

Returns all workflow definitions for the given model.

Parameters:

  • model_name (String)

Returns:

Raises:

  • (NotImplementedError)


9
10
11
# File 'lib/lcp_ruby/workflow/contract.rb', line 9

def workflows_for(model_name)
  raise NotImplementedError, "#{self.class}#workflows_for must be implemented"
end