DEV: Convert some files to autoloading and various improvements (#26860)

This commit is contained in:
Osama Sayegh
2024-05-06 23:12:55 +03:00
committed by GitHub
parent 8bbcd409e3
commit 2f2355b0ad
63 changed files with 90 additions and 186 deletions

View File

@ -0,0 +1,19 @@
# frozen_string_literal: true
module DiscourseAutomation
module PluginInstanceExtension
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
end