Class: Bookbinder::Spider::Result
- Inherits:
-
Object
- Object
- Bookbinder::Spider::Result
- Defined in:
- lib/bookbinder/spider.rb
Instance Method Summary collapse
- #has_broken_links? ⇒ Boolean
-
#initialize(broken_links, sitemap, app_dir) ⇒ Result
constructor
A new instance of Result.
- #to_path ⇒ Object
- #to_xml ⇒ Object
Constructor Details
#initialize(broken_links, sitemap, app_dir) ⇒ Result
Returns a new instance of Result.
11 12 13 14 15 |
# File 'lib/bookbinder/spider.rb', line 11 def initialize(broken_links, sitemap, app_dir) @broken_links = broken_links @sitemap = sitemap @app_dir = app_dir end |
Instance Method Details
#has_broken_links? ⇒ Boolean
17 18 19 |
# File 'lib/bookbinder/spider.rb', line 17 def has_broken_links? @broken_links.any? end |
#to_path ⇒ Object
25 26 27 |
# File 'lib/bookbinder/spider.rb', line 25 def to_path Pathname(@app_dir).join('public/sitemap.xml') end |
#to_xml ⇒ Object
21 22 23 |
# File 'lib/bookbinder/spider.rb', line 21 def to_xml @sitemap end |