Class: BBCNet::CacheMetaInfoDevice
- Inherits:
-
CasheDevice::CacheDeviceBase
- Object
- CasheDevice::CacheDeviceBase
- BBCNet::CacheMetaInfoDevice
- Defined in:
- lib/bbcnet.rb
Instance Attribute Summary
Attributes inherited from CasheDevice::CacheDeviceBase
Class Method Summary collapse
Instance Method Summary collapse
-
#directRead(pid) ⇒ Object
return : [ data, key ] key : key to restore data.
-
#initialize(cacheDuration = 40*60, cacheMax = 200) ⇒ CacheMetaInfoDevice
constructor
A new instance of CacheMetaInfoDevice.
Methods inherited from CasheDevice::CacheDeviceBase
Constructor Details
#initialize(cacheDuration = 40*60, cacheMax = 200) ⇒ CacheMetaInfoDevice
Returns a new instance of CacheMetaInfoDevice.
27 28 29 |
# File 'lib/bbcnet.rb', line 27 def initialize(cacheDuration = 40*60, cacheMax=200) super(cacheDuration, cacheMax) end |
Class Method Details
.read(url) ⇒ Object
38 39 40 41 |
# File 'lib/bbcnet.rb', line 38 def self.read(url) pid = BBCNet.extractPid(url) self.instance.read(pid) end |
Instance Method Details
#directRead(pid) ⇒ Object
return : [ data, key ]
key : key to restore data.
33 34 35 36 |
# File 'lib/bbcnet.rb', line 33 def directRead(pid) data = BBCNet::MetaInfo.new(pid).update [ data, data ] end |