mirror of
https://github.com/hkalexling/Mango.git
synced 2026-04-25 00:00:52 -04:00
Use macro to DRY the self.default method
This commit is contained in:
+1
-6
@@ -8,12 +8,7 @@ class Logger
|
||||
|
||||
@@severity : Log::Severity = :info
|
||||
|
||||
def self.default : self
|
||||
unless @@default
|
||||
@@default = new
|
||||
end
|
||||
@@default.not_nil!
|
||||
end
|
||||
use_default
|
||||
|
||||
def initialize
|
||||
level = Config.current.log_level
|
||||
|
||||
Reference in New Issue
Block a user