Sha256: 5c8a3a08548892eaa225aaa0ab67e4746c47621f2f257448e12161fc72196a52
Contents?: true
Size: 721 Bytes
Versions: 1
Compression:
Stored size: 721 Bytes
Contents
module Activities # Activity Record Class class Record def initialize(doc) @record = doc end def info pickup_record(@record) end private def pickup_record(record_doc) result = {} record_doc.css("td").each_with_index do |td, n| record_content = td.content.strip case n when 0 then result[:round] = record_content when 1 then result[:opponent_rank] = record_content when 2 then result[:opponent_name] = record_content when 3 then result[:win_loss] = record_content when 4 then result[:score] = record_content end end result end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
atp_scraper-0.6.0 | lib/atp_scraper/activities/record.rb |