FEATURE: adds a add_report method accessible in plugin.rb

This commit is contained in:
Joffrey JAFFEUX
2018-06-19 15:00:11 +02:00
committed by GitHub
parent 7eff64773c
commit 24c27b5321
2 changed files with 17 additions and 0 deletions

View File

@ -92,6 +92,14 @@ class Plugin::Instance
end
end
def add_report(name, &block)
reloadable_patch do |plugin|
if plugin.enabled?
Report.add_report(name, &block)
end
end
end
def replace_flags
settings = ::FlagSettings.new
yield settings