mirror of
https://github.com/hkalexling/Mango.git
synced 2026-03-20 00:00:48 -04:00
- group config/library/storage into context
This commit is contained in:
17
src/context.cr
Normal file
17
src/context.cr
Normal file
@@ -0,0 +1,17 @@
|
||||
require "./config"
|
||||
require "./library"
|
||||
require "./storage"
|
||||
require "logger"
|
||||
|
||||
class Context
|
||||
property config : Config
|
||||
property library : Library
|
||||
property storage : Storage
|
||||
|
||||
def initialize
|
||||
@config = Config.load
|
||||
@library = Library.new @config.library_path, @config.scan_interval
|
||||
@storage = Storage.new @config.db_path
|
||||
end
|
||||
|
||||
end
|
||||
Reference in New Issue
Block a user