Class: Octodown::Support::RelativeRootFilter
- Inherits:
-
HTML::Pipeline::Filter
- Object
- HTML::Pipeline::Filter
- Octodown::Support::RelativeRootFilter
- Defined in:
- lib/octodown/support/relative_root_filter.rb
Instance Attribute Summary collapse
-
#root ⇒ Object
Returns the value of attribute root.
-
#server ⇒ Object
Returns the value of attribute server.
Instance Method Summary collapse
Instance Attribute Details
#root ⇒ Object
Returns the value of attribute root.
6 7 8 |
# File 'lib/octodown/support/relative_root_filter.rb', line 6 def root @root end |
#server ⇒ Object
Returns the value of attribute server.
6 7 8 |
# File 'lib/octodown/support/relative_root_filter.rb', line 6 def server @server end |
Instance Method Details
#call ⇒ Object
8 9 10 11 12 13 14 |
# File 'lib/octodown/support/relative_root_filter.rb', line 8 def call @root = context[:original_document_root] @server = context[:server] filter_images doc.search('img') filter_links doc.search('a[href]') end |