Sha256: 70fbe26dabcd34e129cca0da317268bb3f978c0966c586acbe525b2c18ed322d

Contents?: true

Size: 711 Bytes

Versions: 24

Compression:

Stored size: 711 Bytes

Contents

# frozen_string_literal: true

require 'aranha/parsers/html/item_list'
require 'eac_ruby_utils/core_ext'

module EhbrsRubyUtils
  module Bga
    module Parsers
      class GameStats < ::Aranha::Parsers::Html::ItemList
        class Players < ::Aranha::Parsers::Html::ItemList
          ITEMS_XPATH = '//div[@class = "simple-score-entry"]'

          field :rank, :integer_optional, './div[@class = "rank"]'
          field :id, :integer, './div[@class = "name"]/a/@href'
          field :name, :string, './div[@class = "name"]/a/text()'
          field :score, :integer_optional, './div[@class = "score"]'

          def items_xpath
            ITEMS_XPATH
          end
        end
      end
    end
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
ehbrs_ruby_utils-0.44.2 lib/ehbrs_ruby_utils/bga/parsers/game_stats/players.rb
ehbrs_ruby_utils-0.44.1 lib/ehbrs_ruby_utils/bga/parsers/game_stats/players.rb
ehbrs_ruby_utils-0.44.0 lib/ehbrs_ruby_utils/bga/parsers/game_stats/players.rb
ehbrs_ruby_utils-0.41.1 lib/ehbrs_ruby_utils/bga/parsers/game_stats/players.rb
ehbrs_ruby_utils-0.41.0 lib/ehbrs_ruby_utils/bga/parsers/game_stats/players.rb
ehbrs_ruby_utils-0.40.0 lib/ehbrs_ruby_utils/bga/parsers/game_stats/players.rb
ehbrs_ruby_utils-0.39.0 lib/ehbrs_ruby_utils/bga/parsers/game_stats/players.rb
ehbrs_ruby_utils-0.38.0 lib/ehbrs_ruby_utils/bga/parsers/game_stats/players.rb
ehbrs_ruby_utils-0.37.0 lib/ehbrs_ruby_utils/bga/parsers/game_stats/players.rb
ehbrs_ruby_utils-0.36.1 lib/ehbrs_ruby_utils/bga/parsers/game_stats/players.rb
ehbrs_ruby_utils-0.36.0 lib/ehbrs_ruby_utils/bga/parsers/game_stats/players.rb
ehbrs_ruby_utils-0.35.0 lib/ehbrs_ruby_utils/bga/parsers/game_stats/players.rb
ehbrs_ruby_utils-0.33.0 lib/ehbrs_ruby_utils/bga/parsers/game_stats/players.rb
ehbrs_ruby_utils-0.32.0 lib/ehbrs_ruby_utils/bga/parsers/game_stats/players.rb
ehbrs_ruby_utils-0.31.0 lib/ehbrs_ruby_utils/bga/parsers/game_stats/players.rb
ehbrs_ruby_utils-0.30.0 lib/ehbrs_ruby_utils/bga/parsers/game_stats/players.rb
ehbrs_ruby_utils-0.29.0 lib/ehbrs_ruby_utils/bga/parsers/game_stats/players.rb
ehbrs_ruby_utils-0.28.0 lib/ehbrs_ruby_utils/bga/parsers/game_stats/players.rb
ehbrs_ruby_utils-0.27.1 lib/ehbrs_ruby_utils/bga/parsers/game_stats/players.rb
ehbrs_ruby_utils-0.27.0 lib/ehbrs_ruby_utils/bga/parsers/game_stats/players.rb