Minor fix: don't initialise livecheck unless needed

This commit is contained in:
Mohammad Zain Abbas 2022-06-30 17:01:11 +02:00
parent 1ba610707d
commit 7692098cd1

View File

@ -183,7 +183,7 @@ class Resource
# regex /foo-(\d+(?:\.\d+)+)\.tar/
# end</pre>
def livecheck(&block)
@livecheck ||= Livecheck.new(self)
@livecheck ||= Livecheck.new(self) if block
return @livecheck unless block
@livecheckable = true