From 4b3b2d034dc73eaa87c7d23936006b064d9bb00f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9A=D0=BE=D0=B2=D0=B0=D0=BB=D0=B5=D0=B2=20=D0=92=D0=BB?= =?UTF-8?q?=D0=B0=D0=B4=D0=B8=D0=BC=D0=B8=D1=80=20=D0=92=D0=B8=D0=BA=D1=82?= =?UTF-8?q?=D0=BE=D1=80=D0=BE=D0=B2=D0=B8=D1=87?= Date: Thu, 22 Apr 2021 01:56:18 +0300 Subject: [PATCH] fix --- Vladimir_Kovalev/2/checker.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Vladimir_Kovalev/2/checker.rb b/Vladimir_Kovalev/2/checker.rb index 6a154c7f..1f73b55a 100644 --- a/Vladimir_Kovalev/2/checker.rb +++ b/Vladimir_Kovalev/2/checker.rb @@ -125,7 +125,7 @@ class << self def fetch(url) f = self::filename(url) puts "#{Time.now.to_i - File.atime(f).to_i} < #{60 * 60}" if Options.verbose - if self::exist?(f) && (Time.now.to_i - File.atime(f).to_i) < 60 * 60 + if self.exist?(f) && (Time.now.to_i - File.atime(f).to_i) < 60 * 60 YAML.load(IO.read(f)) else false @@ -141,8 +141,8 @@ def filename(url) end def push(url, data) - FileUtils.rm self::filename(url) if self::exist?(self::filename(url)) - IO.write(self::filename(url), data.to_yaml) + FileUtils.rm self.filename(url) if self.exist?(self.filename(url)) + IO.write(self.filename(url), data.to_yaml) end def exist?(file)