-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathModulePrototype.lua
More file actions
42 lines (34 loc) · 805 Bytes
/
ModulePrototype.lua
File metadata and controls
42 lines (34 loc) · 805 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
---@class ns
local ns = select(2, ...)
local export = {}
---@param addon GlobalSearch
---@return table
function export.Create(addon)
---@class ModulePrototype
local ModulePrototype = {}
---@return AceDBObject-3.0
function ModulePrototype:GetDB()
return addon.db
end
---@return SearchProviderRegistry
function ModulePrototype:GetSearchProviderRegistry()
return addon.providerRegistry
end
---@return boolean
function ModulePrototype:IsDebugMode()
return addon:IsDebugMode()
end
---@param self ModulePrototype|AceConsole-3.0
---@param message string
---@param ... unknown
function ModulePrototype.Debugf(self, message, ...)
if self:IsDebugMode() then
self:Printf(message, ...)
end
end
return ModulePrototype
end
if ns then
ns.ModulePrototype = export
end
return export