module FFaker::Random
Experimental RBS support (using type sampling data from the type_fusion
project).
# sig/ffaker.rbs module FFaker::Random def self.rand: (?(Integer | Range) max) -> Integer def self.rng: () -> Random end
def self.new_rng
def self.new_rng ::Random.new(seed) end
def self.rand(max = nil)
Experimental RBS support (using type sampling data from the type_fusion
project).
def self.rand: (?(Integer | Range) max) -> Integer
This signature was generated using 6 samples from 1 application.
def self.rand(max = nil) return rng.rand(max) if max rng.rand end
def self.reset!
def self.reset! @rng = new_rng end
def self.rng
Experimental RBS support (using type sampling data from the type_fusion
project).
def self.rng: () -> Random
This signature was generated using 6 samples from 1 application.
def self.rng @rng ||= new_rng end
def self.seed
def self.seed @seed ||= ::Random.new_seed end
def self.seed=(new_seed)
def self.seed=(new_seed) @seed = new_seed reset! new_seed end