Module: Obfuscator::Internal::RNG Private
- Included in:
- DateObfuscator, Multilang, Naturalizer, NumberObfuscator
- Defined in:
- lib/obfuscator/internal/rng.rb
Overview
This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.
Internal module providing Random Number Generation functionality. This module is intended for internal use only and shouldn’t be used directly by gem users.
Provides consistent random number generation across the gem’s classes, with optional seed support for reproducible results.
Usage:
include Internal::RNG
def initialize(seed = nil)
setup_rng(seed)
end
private
def some_method
random_sample(some_array) # For array sampling
random_probability # For random float between 0 and 1
random_range(some_range) # For range sampling
end