Class: MimiCheck::Generator::Int

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

Instance Method Summary collapse

Methods included from MimiCheck::Generator

#call, #to_proc

Constructor Details

#initialize(range = -1e9..1e9) ⇒ Int

Returns a new instance of Int.



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

def initialize(range = -1e9..1e9)
  @float_gen = Float.new(range)
end

Instance Method Details

#generateObject



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

def generate
  float_gen.generate.to_i
end