Sha256: b3034a326c7e58dca9f664ef8ccfeb90e8a609388bff037da59a44f339bdb282
Contents?: true
Size: 843 Bytes
Versions: 5
Compression:
Stored size: 843 Bytes
Contents
# frozen_string_literal: true module Dor module Workflow class Client # Makes requests relating to a workflow template class WorkflowTemplate def initialize(requestor:) @requestor = requestor end # Retrieves a representation of the workflow template # # @param [String] workflow_name The name of the workflow you want to retrieve # @return [Hash] a representation of the workflow template # @example: # retrieve('assemblyWF') => '{"processes":[{"name":"start-assembly"},{"name":"content-metadata-create"},...]}' # def retrieve(workflow_name) body = requestor.request "workflow_templates/#{workflow_name}" JSON.parse(body) end private attr_reader :requestor end end end end
Version data entries
5 entries across 5 versions & 1 rubygems