class BankCrawlers::Hapoalim::Cache
Public Instance Methods
clear()
click to toggle source
# File lib/bank_crawlers/hapoalim/cache.rb, line 13 def clear File.unlink todays_transaction_table_file end
get()
click to toggle source
# File lib/bank_crawlers/hapoalim/cache.rb, line 3 def get todays_transaction_table_file.read if todays_transaction_table_file.exist? end
set(transaction_table)
click to toggle source
# File lib/bank_crawlers/hapoalim/cache.rb, line 7 def set transaction_table FileUtils.makedirs(dir) File.write todays_transaction_table_file, transaction_table transaction_table end
Private Instance Methods
dir()
click to toggle source
# File lib/bank_crawlers/hapoalim/cache.rb, line 23 def dir "tmp" end
todays_transaction_table_file()
click to toggle source
# File lib/bank_crawlers/hapoalim/cache.rb, line 19 def todays_transaction_table_file Pathname "tmp/transactions-#{Date.today}.html" end