Method: RDig::Document#initialize

Defined in:
lib/rdig/documents.rb

#initialize(args) ⇒ Document

url: url of this document, may be relative to the referring doc or host. referrer: uri of the document we retrieved this link from



23
24
25
26
27
28
29
30
# File 'lib/rdig/documents.rb', line 23

def initialize(args)
  RDig.logger.debug "initialize: #{args.inspect}"
  begin
    @uri = URI.parse(args[:uri])
  rescue URI::InvalidURIError
    raise "Cannot create document using invalid URL: #{args[:uri]}"
  end
end