module Nao

Constants

VERSION

Public Class Methods

parse(name) click to toggle source
# File lib/nao.rb, line 6
def parse name
  agent = Mechanize.new
  page = agent.get "http://alt.org/nethack/player-all-xlog.php?player=#{name}"
  res = page.search('//div[@class="body"]/pre').text.split("\n")
  res.map { |s| Hash[*s.split(/[=|:]/)] }
end