Sha256: f47c83fa82f931db716aacf35bce574d200ba3e45fb5ad893c917ebcc13921b7

Contents?: true

Size: 711 Bytes

Versions: 2

Compression:

Stored size: 711 Bytes

Contents

# frozen_string_literal: true

require "securerandom"

module FairDiceRoll
  RANDOM_NUMBER = 12 # chosen by fair dice roll.
                     # guaranteed to be random.
end

module Kernel
  def self.rand(*)
    FairDiceRoll::RANDOM_NUMBER
  end

  def rand(*)
    FairDiceRoll::RANDOM_NUMBER
  end
end

class Random
  def self.rand(*)
    FairDiceRoll::RANDOM_NUMBER
  end

  def self.random_number(*)
    FairDiceRoll::RANDOM_NUMBER
  end

  def rand(*)
    FairDiceRoll::RANDOM_NUMBER
  end

  def random_number(*)
    FairDiceRoll::RANDOM_NUMBER
  end
end

module SecureRandom
  def self.rand(*)
    FairDiceRoll::RANDOM_NUMBER
  end

  def self.random_number(*)
    FairDiceRoll::RANDOM_NUMBER
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
fair_dice_roll-7.0.1 lib/fair_dice_roll.rb
fair_dice_roll-7.0.0 lib/fair_dice_roll.rb