discourse/plugins/automation/lib/plugin/instance.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

18 lines
501 B
Ruby
Raw Normal View History

# frozen_string_literal: true
class Plugin::Instance
def add_automation_scriptable(name, &block)
reloadable_patch { DiscourseAutomation::Scriptable.add(name, &block) }
end
def add_automation_triggerable(name, &block)
reloadable_patch { DiscourseAutomation::Triggerable.add(name, &block) }
end
def add_triggerable_to_scriptable(triggerable, scriptable)
reloadable_patch do
DiscourseAutomation::Scriptable.add_plugin_triggerable(triggerable, scriptable)
end
end
end