Class: MimiCheck::Generator::UInt

Inherits:
Object
  • Object
show all
Includes:
MimiCheck::Generator
Defined in:
lib/mimicheck/generator/uint.rb

Instance Method Summary collapse

Methods included from MimiCheck::Generator

#call, #to_proc

Constructor Details

#initialize(range = 0..1e9) ⇒ UInt

Returns a new instance of UInt.



6
7
8
# File 'lib/mimicheck/generator/uint.rb', line 6

def initialize(range = 0..1e9)
  @int_gen = Int.new(range)
end

Instance Method Details

#generateObject



12
13
14
# File 'lib/mimicheck/generator/uint.rb', line 12

def generate
  int_gen.generate.abs
end