Class: Html2rss::ItemExtractors::Static

Inherits:
Object
  • Object
show all
Defined in:
lib/html2rss/item_extractors/static.rb

Overview

YAML usage example:

selectors:
  autor:
    extractor: static
    static: Foobar

Would return:

'Foobar'

Instance Method Summary collapse

Constructor Details

#initialize(_xml, options) ⇒ Static

Returns a new instance of Static



14
15
16
# File 'lib/html2rss/item_extractors/static.rb', line 14

def initialize(_xml, options)
  @options = options
end

Instance Method Details

#getObject

Returns what options holds.

options = { static: 'Foobar' }
Static.new(xml, options).get
# => 'Foobar'


23
24
25
# File 'lib/html2rss/item_extractors/static.rb', line 23

def get
  @options['static']
end