Sha256: a3b44b3d520adbb31f3019eebadd920de3c96a41891950c6a0633c75ec34ebba
Contents?: true
Size: 952 Bytes
Versions: 13
Compression:
Stored size: 952 Bytes
Contents
# frozen_string_literal: true require 'aranha/parsers/html/item' require 'aranha/parsers/html/item_list' require 'eac_ruby_utils/core_ext' module EhbrsRubyUtils module Bga module Parsers class Table < ::Aranha::Parsers::Html::Item class Options < ::Aranha::Parsers::Html::ItemList ITEMS_XPATH = '//div[starts-with(@id, "gameoption_") ' \ 'and not(contains(@style, "none"))]' field :label, :string, './div[@class = "row-label"]/text()' field :value, :string, './div[@class = "row-value"]' \ "//*[#{xpath_ends_with('@id', "'_displayed_value'")}]/text()" field :description, :string, './div[@class = "gameoption_description"]/text()' def items_xpath ITEMS_XPATH end def data super.reject { |item| item.fetch(:label).blank? } end end end end end end
Version data entries
13 entries across 13 versions & 1 rubygems