module PlayWhe::Parser

Constants

PATTERN

Public Class Methods

parse(html_results) click to toggle source
# File lib/playwhe/parser.rb, line 5
def self.parse(html_results)
  html_results.to_enum(:scan, PATTERN).map do
    m = $~
    date = "#{m[:day]}-#{m[:month]}-#{m[:year]}"

    Result.new \
      draw: m[:draw], date: date, mark: m[:mark], period: m[:period]
  end
end