|
What this is
Other links
The source code
# Copyritght (c) 2002 TANIGUCHI Takaki
# This program is distributed under the GNU GPL 2 or later.
require 'dbm'
module AsWiki
class RevLink
def initialize
@db = DBM::new(File.join($DIR_CACHE,'revlink'))
end
def clear
@db.clear
end
def regist(page, links)
links.each{|l|
ll = @db.has_key?(l) ? @db[l].split : []
ll = ll | [page]
@db[l] = ll.join(' ')
}
end
def list(page)
r = @db[page]
return r ? r.split : []
end
end
end
|
Copyright 1998-2008 Alvin Alexander
All Rights Reserved.
devdaily.com is based in louisville, kentucky, and this web site is hosted by godaddy.com