|
|
|
@ -3,7 +3,7 @@ require 'set'
|
|
|
|
|
module Docs
|
|
|
|
|
class Scraper < Doc
|
|
|
|
|
class << self
|
|
|
|
|
attr_accessor :base_url, :root_path, :initial_paths, :options, :html_filters, :text_filters
|
|
|
|
|
attr_accessor :base_url, :home_url, :root_path, :initial_paths, :options, :html_filters, :text_filters
|
|
|
|
|
|
|
|
|
|
def inherited(subclass)
|
|
|
|
|
super
|
|
|
|
@ -65,6 +65,10 @@ module Docs
|
|
|
|
|
@root_url ||= root_path? ? URL.parse(File.join(base_url.to_s, root_path)) : base_url.normalize
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
def home_url
|
|
|
|
|
@home_url ||= URL.parse self.class.home_url
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
def root_path
|
|
|
|
|
self.class.root_path
|
|
|
|
|
end
|
|
|
|
|