Class: BBCNet::CacheMetaInfoDevice

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

Instance Attribute Summary

Attributes inherited from CasheDevice::CacheDeviceBase

#cacheDuration, #cacheMax

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from CasheDevice::CacheDeviceBase

#read, #restoreCache

Constructor Details

#initialize(cacheDuration = 40*60, cacheMax = 200) ⇒ CacheMetaInfoDevice

Returns a new instance of CacheMetaInfoDevice.



29
30
31
# File 'lib/bbcnet.rb', line 29

def initialize(cacheDuration = 40*60, cacheMax=200)
    super(cacheDuration, cacheMax)
end

Class Method Details

.read(url) ⇒ Object



40
41
42
43
# File 'lib/bbcnet.rb', line 40

def self.read(url)
    pid = BBCNet.extractPid(url)
    self.instance.read(pid)
end

Instance Method Details

#directRead(pid) ⇒ Object



35
36
37
38
# File 'lib/bbcnet.rb', line 35

def directRead(pid)
    data = BBCNet::MetaInfo.new(pid).update
    [ data, data ]
end