summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/glsa_repository.rb')
-rw-r--r--lib/glsa_repository.rb7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/glsa_repository.rb b/lib/glsa_repository.rb
index 9fe571a..ae45369 100644
--- a/lib/glsa_repository.rb
+++ b/lib/glsa_repository.rb
@@ -44,7 +44,7 @@ class GLSARepository
end
def latest(n = 10)
- @latest[0...n].map {|id| @advisories[id] }
+ @latest[0...n].map { |id| @advisories[id] }
end
def[](id)
@@ -52,13 +52,14 @@ class GLSARepository
end
def has?(id)
- @advisories.has_key? id
+ @advisories.key? id
end
private
+
def update?
if ((DateTime.now - @load_date) * 60 * 60 * 24).to_i > CACHE_SECONDS
update!
end
end
-end \ No newline at end of file
+end