Sha256: 8cbd45c46851ef948537d880ade06e17e60675b50531651199b233093319363a
Contents?: true
Size: 579 Bytes
Versions: 1
Compression:
Stored size: 579 Bytes
Contents
# frozen_string_literal: true module Dor module Workflow module Response # The response form asking the server about a workflow for an item class Workflow def initialize(xml:) @xml = xml end # @param [Integer] version the version we are checking for. def active_for?(version:) result = ng_xml.at_xpath("/workflow/process[@version=#{version}]") result ? true : false end private def ng_xml @ng_xml ||= Nokogiri::XML(@xml) end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
dor-workflow-service-2.5.0 | lib/dor/models/response/workflow.rb |