Class: Html2rss::AttributePostProcessors::ParseUri
- Inherits:
-
Object
- Object
- Html2rss::AttributePostProcessors::ParseUri
- Defined in:
- lib/html2rss/attribute_post_processors/parse_uri.rb
Overview
Returns the URI as String.
Imagine this HTML structure:
<span>http://why-not-use-a-link.uh</span>
YAML usage example:
selectors:
link:
selector: span
extractor: text
post_process:
name: parse_uri
Would return:
'http://why-not-use-a-link.uh'
Instance Method Summary collapse
- #get ⇒ String
-
#initialize(value, _options, _item) ⇒ ParseUri
constructor
A new instance of ParseUri.
Constructor Details
#initialize(value, _options, _item) ⇒ ParseUri
Returns a new instance of ParseUri
21 22 23 |
# File 'lib/html2rss/attribute_post_processors/parse_uri.rb', line 21 def initialize(value, , _item) @value = value end |
Instance Method Details
#get ⇒ String
27 28 29 |
# File 'lib/html2rss/attribute_post_processors/parse_uri.rb', line 27 def get URI(@value).to_s end |