Sha256: 151d58e32e53decf35a5980491a2de66988694ce7843b47ab38c5508118492c8

Contents?: true

Size: 541 Bytes

Versions: 9

Compression:

Stored size: 541 Bytes

Contents

module Html2rss
  module ItemExtractors
    ##
    # YAML usage example:
    #
    #    selectors:
    #      autor:
    #        extractor: static
    #        static: Foobar
    #
    # Would return:
    #    'Foobar'
    class Static
      def initialize(_xml, options)
        @options = options
      end

      # Returns what options['static'] holds.
      #
      #    options = { static: 'Foobar' }
      #    Static.new(xml, options).get
      #    # => 'Foobar'
      def get
        @options['static']
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
html2rss-0.8.1 lib/html2rss/item_extractors/static.rb
html2rss-0.8.0 lib/html2rss/item_extractors/static.rb
html2rss-0.7.0 lib/html2rss/item_extractors/static.rb
html2rss-0.6.0 lib/html2rss/item_extractors/static.rb
html2rss-0.5.2 lib/html2rss/item_extractors/static.rb
html2rss-0.5.1 lib/html2rss/item_extractors/static.rb
html2rss-0.5.0 lib/html2rss/item_extractors/static.rb
html2rss-0.4.1 lib/html2rss/item_extractors/static.rb
html2rss-0.4.0 lib/html2rss/item_extractors/static.rb