mirror of
https://github.com/hkalexling/Mango.git
synced 2026-04-04 00:00:51 -04:00
Use macro to DRY the self.default method
This commit is contained in:
@@ -1,12 +1,6 @@
|
||||
class Plugin
|
||||
class Downloader < Queue::Downloader
|
||||
|
||||
def self.default : self
|
||||
unless @@default
|
||||
@@default = new
|
||||
end
|
||||
@@default.not_nil!
|
||||
end
|
||||
use_default
|
||||
|
||||
def initialize
|
||||
super
|
||||
|
||||
Reference in New Issue
Block a user