Sha256: 390ee4cdf7842cbf6fb4a41d7b2a50e533c98ea3c881b11aaa06220af6a6be84
Contents?: true
Size: 919 Bytes
Versions: 14
Compression:
Stored size: 919 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
14 entries across 14 versions & 1 rubygems