Class: CurationConcerns::Workflow::SipityActionsGenerator

Inherits:
Object
  • Object
show all
Defined in:
app/services/curation_concerns/workflow/sipity_actions_generator.rb

Overview

Responsible for creating database entries for the given workflow’s actions

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(workflow:, actions_configuration:) ⇒ SipityActionsGenerator

Returns a new instance of SipityActionsGenerator.



16
17
18
19
# File 'app/services/curation_concerns/workflow/sipity_actions_generator.rb', line 16

def initialize(workflow:, actions_configuration:)
  self.workflow = workflow
  self.actions_configuration = actions_configuration
end

Class Method Details

.call(**keywords, &block) ⇒ Sipity::Workflow

Responsible for creating database entries for the given workflow’s actions

Parameters:

  • workflow (Sipity::Workflow)
  • actions_configuration (Hash)

    as defined in CurationConcerns::Workflow::WorkflowSchema

Returns:



12
13
14
# File 'app/services/curation_concerns/workflow/sipity_actions_generator.rb', line 12

def self.call(**keywords, &block)
  new(**keywords, &block).call
end

Instance Method Details

#callObject



33
34
35
36
# File 'app/services/curation_concerns/workflow/sipity_actions_generator.rb', line 33

def call
  generate_state_diagram!
  workflow
end