module Decidim::Verifications
This holds the decidim-verifications version.
Public Class Methods
admin_workflows()
click to toggle source
Collection of registered verification workflows having an admin engine
# File lib/decidim/verifications/workflows.rb, line 56 def admin_workflows workflows.select(&:admin_engine) end
find_workflow_manifest(name)
click to toggle source
Finds a verification workflow by name
# File lib/decidim/verifications/workflows.rb, line 42 def find_workflow_manifest(name) workflows.find { |workflow| workflow.name == name.to_s } end
register_workflow(name, &block)
click to toggle source
Registers a new verification workflow using the workflow manifest API
# File lib/decidim/verifications/workflows.rb, line 26 def register_workflow(name, &block) registry.register_workflow(name, &block) end
reset_workflows(*manifests)
click to toggle source
Restores registered verification workflows to the array being passed in
Useful for testing.
# File lib/decidim/verifications/workflows.rb, line 19 def reset_workflows(*manifests) registry.reset_workflows(*manifests) end
unregister_workflow(name)
click to toggle source
Unregisters a verification workflow using the workflow manifest API
# File lib/decidim/verifications/workflows.rb, line 33 def unregister_workflow(name) manifest = find_workflow_manifest(name) registry.unregister_workflow(manifest) end
version()
click to toggle source
# File lib/decidim/verifications/version.rb, line 6 def self.version "0.24.3" end
workflows()
click to toggle source
Collection of registered verification workflows
# File lib/decidim/verifications/workflows.rb, line 49 def workflows registry.workflow_collection end
Private Class Methods
registry()
click to toggle source
# File lib/decidim/verifications/workflows.rb, line 62 def registry @registry ||= Registry.new end