lib/vin_exploder/cache.rb in vin_exploder-0.4.8 vs lib/vin_exploder/cache.rb in vin_exploder-0.5.0
- old
+ new
@@ -34,11 +34,11 @@
#
def fetch(vin)
hash = read(vin)
if block_given?
if hash.nil?
- hash = yield
+ hash = yield
# adapter should raise exception on error but in case it doesn't don't write to cache
write(vin, hash) unless hash.empty? || (hash[:errors] && !hash[:errors].empty?)
end
end
hash
@@ -77,6 +77,6 @@
end
end
end
-end
\ No newline at end of file
+end