Unified · Split
| @@ -3,7 +3,7 @@ require 'set' · 2 unmodified lines | |||
| 3 | module Docs | 3 | module Docs |
| 4 | class Scraper < Doc | 4 | class Scraper < Doc |
| 5 | class << self | 5 | class << self |
| 6 | attr_accessor :base_url, :root_path, :initial_paths, :options, :html_filters, :text_filters | 6 | attr_accessor :base_url, :home_url, :root_path, :initial_paths, :options, :html_filters, :text_filters |
| 7 | 7 | ||
| 8 | def inherited(subclass) | 8 | def inherited(subclass) |
| 9 | super | 9 | super |
| @@ -65,6 +65,10 @@ module Docs · 55 unmodified lines | |||
| 65 | @root_url ||= root_path? ? URL.parse(File.join(base_url.to_s, root_path)) : base_url.normalize | 65 | @root_url ||= root_path? ? URL.parse(File.join(base_url.to_s, root_path)) : base_url.normalize |
| 66 | end | 66 | end |
| 67 | 67 | ||
| 68 | def home_url | ||
| 69 | @home_url ||= URL.parse self.class.home_url | ||
| 70 | end | ||
| 71 | |||
| 68 | def root_path | 72 | def root_path |
| 69 | self.class.root_path | 73 | self.class.root_path |
| 70 | end | 74 | end |