File tree 1 file changed +10
-4
lines changed
1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change 1
1
--- @class grapple.app
2
2
--- @field settings grapple.settings
3
+ --- @field cache grapple.cache
3
4
--- @field scope_manager grapple.scope_manager
4
5
--- @field tag_manager grapple.tag_manager
5
6
local App = {}
@@ -29,21 +30,26 @@ function App:new()
29
30
local State = require (" grapple.state" )
30
31
local TagManager = require (" grapple.tag_manager" )
31
32
33
+ local settings = Settings :new ()
34
+
32
35
local app = setmetatable ({
33
- settings = nil ,
36
+ settings = settings ,
37
+ cache = Cache :new (),
34
38
scope_manager = nil ,
35
39
tag_manager = nil ,
36
40
}, self )
37
41
38
- local settings = Settings :new ()
39
-
42
+ -- TODO: I think the "scope" cache and "glboal" cache should be separate.
43
+ -- Think about this more and decided on the best approach. Note: right now
44
+ -- the scope manager only really needs the "app" to get the tag_manager for
45
+ -- a single method. A bit of refactoring could probably remove this
46
+ -- dependency
40
47
local cache = Cache :new ()
41
48
local scope_manager = ScopeManager :new (app , cache )
42
49
43
50
local state = State :new (settings .save_path )
44
51
local tag_manager = TagManager :new (app , state )
45
52
46
- app .settings = settings
47
53
app .scope_manager = scope_manager
48
54
app .tag_manager = tag_manager
49
55
You can’t perform that action at this time.
0 commit comments