Class: Html2rss::ItemExtractors::Static
- Inherits:
-
Object
- Object
- Html2rss::ItemExtractors::Static
- Defined in:
- lib/html2rss/item_extractors/static.rb
Overview
Returns a static value provided in the options.
Example usage in YAML:
selectors:
author:
extractor: static
static: Foobar
Would return:
'Foobar'
Defined Under Namespace
Classes: Options
Instance Method Summary collapse
-
#get ⇒ String, Symbol
Retrieves and returns the static value.
-
#initialize(_xml, options) ⇒ Static
constructor
Initializes the Static extractor.
Constructor Details
#initialize(_xml, options) ⇒ Static
Initializes the Static extractor.
26 27 28 |
# File 'lib/html2rss/item_extractors/static.rb', line 26 def initialize(_xml, ) @options = end |
Instance Method Details
#get ⇒ String, Symbol
Retrieves and returns the static value.
34 35 36 |
# File 'lib/html2rss/item_extractors/static.rb', line 34 def get @options.static end |