Class: EhbrsRubyUtils::Bga::Parsers::GameStats

Inherits:
Aranha::Parsers::Html::ItemList
  • Object
show all
Defined in:
lib/ehbrs_ruby_utils/bga/parsers/game_stats.rb,
lib/ehbrs_ruby_utils/bga/parsers/game_stats/players.rb

Defined Under Namespace

Classes: Players

Constant Summary collapse

ITEMS_XPATH =
'//table[@id = "gamelist_inner"]/tr'

Instance Method Summary collapse

Instance Method Details

#item_data(item) ⇒ Object



24
25
26
27
28
29
# File 'lib/ehbrs_ruby_utils/bga/parsers/game_stats.rb', line 24

def item_data(item)
  r = super
  r[:id] = table_name_to_id(r.delete(:table_name))
  r[:players] = players_data(r.delete(:players))
  r
end

#items_xpathObject



20
21
22
# File 'lib/ehbrs_ruby_utils/bga/parsers/game_stats.rb', line 20

def items_xpath
  ITEMS_XPATH
end