Sha256: 39e6ecc8cf9223517b2d57ef51fb4f8292753cabf68cc1522a8f921705af27c3

Contents?: true

Size: 531 Bytes

Versions: 1

Compression:

Stored size: 531 Bytes

Contents

module Lottery
  module Taiwan
    include Lottery::LotteryHelper
    extend self

    # SuperLotto638
    def super_lotto_638
      make_hash(draw(38, 6), draw(8, 1))
    end

    # Lotto649
    def lotto_649
      make_hash(draw(49, 6))
    end

    # Daily Cash 539
    def daily_cash_539
      make_hash(draw(39, 5))
    end

    def three_stars
      digit_draw
    end

    def four_stars
      digit_draw(4)
    end

    private

    def digit_draw(digits=3)
      ('0' * digits ..'9' * digits).to_a.sample
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
lottery-0.0.5 lib/lottery/taiwan.rb