Class: Contracts::Builtin::Num
- Inherits:
-
Object
- Object
- Contracts::Builtin::Num
- Defined in:
- lib/contracts/builtin_ext.rb
Class Method Summary collapse
Class Method Details
.generate(min: -2e31.to_f, max: (2e31 - 1).to_f) ⇒ Object
11 12 13 14 |
# File 'lib/contracts/builtin_ext.rb', line 11 def self.generate(min: -2e31.to_f, max: (2e31 - 1).to_f) raise 'min should not be greater than max' if min > max Random.rand(min..max) end |