Class: CacheRssDevice

Inherits:
CasheDevice::CacheDeviceBase show all
Defined in:
lib/cache.rb

Overview

practical implementations.

Instance Attribute Summary

Attributes inherited from CasheDevice::CacheDeviceBase

#cacheDuration, #cacheMax

Instance Method Summary collapse

Methods inherited from CasheDevice::CacheDeviceBase

read, #read, #restoreCache

Constructor Details

#initialize(cacheDuration = 12*60, cacheMax = 6) ⇒ CacheRssDevice

Returns a new instance of CacheRssDevice.



70
71
72
# File 'lib/cache.rb', line 70

def initialize(cacheDuration = 12*60, cacheMax=6)
    super(cacheDuration, cacheMax)
end

Instance Method Details

#directRead(url) ⇒ Object



76
77
78
79
# File 'lib/cache.rb', line 76

def directRead(url)
     data = Nokogiri::XML(CacheHttpDiskDevice.read(url))
     [ data, data ]
end