class Xapian::Indexer::Spider::Fetch

Attributes

controller[R]
current_resource[R]
database[R]

Public Class Methods

new(database, controller, link) click to toggle source
# File lib/xapian/indexer/spider.rb, line 57
def initialize(database, controller, link)
        @database = database
        @controller = controller
        
        @document = false
        @current_resource = controller.create(link)
        @archived_resource = false
end

Public Instance Methods

archived_resource() click to toggle source
# File lib/xapian/indexer/spider.rb, line 84
def archived_resource
        if @archived_resource === false
                if document
                        @archived_resource = @controller.recreate(document.data)
                end
        end
        
        return @archived_resource
end
document() click to toggle source
# File lib/xapian/indexer/spider.rb, line 70
def document
        if @document === false
                postlist = @database.postlist(@current_resource.name_digest)

                if postlist.size > 0
                        @document = @database.document(postlist[0].docid)
                else
                        @document = nil
                end
        end
        
        return @document
end