Sha256: ce981253a86f0e2c46011767248b1ad511e41e277f03bddc43297a925d9082bc

Contents?: true

Size: 486 Bytes

Versions: 115

Compression:

Stored size: 486 Bytes

Contents

# frozen_string_literal: true

require 'aranha/parsers/html/base'

module Aranha
  module Parsers
    module Html
      class Item < Base
        def data
          @data ||= node_parser.parse(item_node)
        end

        def item_node
          @item_node ||= begin
            r = item_xpath ? nokogiri.at_xpath(item_xpath) : nokogiri
            raise "Item node not found (Item xpath: #{item_xpath})" unless r

            r
          end
        end
      end
    end
  end
end

Version data entries

115 entries across 115 versions & 3 rubygems

Version Path
aranha-parsers-0.16.0 lib/aranha/parsers/html/item.rb
eac_tools-0.55.2 sub/aranha-parsers/lib/aranha/parsers/html/item.rb
aranha-parsers-0.15.1 lib/aranha/parsers/html/item.rb
aranha-parsers-0.15.0 lib/aranha/parsers/html/item.rb
eac_tools-0.55.1 sub/aranha-parsers/lib/aranha/parsers/html/item.rb
eac_tools-0.55.0 sub/aranha-parsers/lib/aranha/parsers/html/item.rb
eac_tools-0.54.0 sub/aranha-parsers/lib/aranha/parsers/html/item.rb
eac_tools-0.53.0 sub/aranha-parsers/lib/aranha/parsers/html/item.rb
eac_tools-0.52.0 sub/aranha-parsers/lib/aranha/parsers/html/item.rb
eac_tools-0.51.0 sub/aranha-parsers/lib/aranha/parsers/html/item.rb
eac_tools-0.50.0 sub/aranha-parsers/lib/aranha/parsers/html/item.rb
eac_tools-0.49.0 sub/aranha-parsers/lib/aranha/parsers/html/item.rb
eac_tools-0.48.1 sub/aranha-parsers/lib/aranha/parsers/html/item.rb
eac_tools-0.48.0 sub/aranha-parsers/lib/aranha/parsers/html/item.rb
eac_tools-0.47.2 sub/aranha-parsers/lib/aranha/parsers/html/item.rb
eac_tools-0.47.1 sub/aranha-parsers/lib/aranha/parsers/html/item.rb
eac_tools-0.47.0 sub/aranha-parsers/lib/aranha/parsers/html/item.rb
eac_tools-0.46.0 sub/aranha-parsers/lib/aranha/parsers/html/item.rb
eac_tools-0.45.2 sub/aranha-parsers/lib/aranha/parsers/html/item.rb
eac_tools-0.45.1 sub/aranha-parsers/lib/aranha/parsers/html/item.rb