Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Ковалев Владимир Викторович committed Apr 21, 2021
1 parent 597585c commit 4b3b2d0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Vladimir_Kovalev/2/checker.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
Expand Down

0 comments on commit 4b3b2d0

Please sign in to comment.