Class: Fixnum
- Inherits:
-
Object
- Object
- Fixnum
- Defined in:
- lib/dsl/monkeypatches.rb
Overview
Enchancement of Fixnum
class to generate random number in the interval [0, Fixnum).
Class Method Summary collapse
-
.new(val = 1024) ⇒ Object
Generates random
Fixnum
in the given interval.
Instance Method Summary collapse
-
#∀ ⇒ Object
(also: #any)
Generates random
Fixnum
in the given interval.
Class Method Details
.new(val = 1024) ⇒ Object
Generates random Fixnum
in the given interval. We need Fixnum
implementing new
method for instantiating it as parameter in common way.
86 87 88 |
# File 'lib/dsl/monkeypatches.rb', line 86 def self.new val = 1024 val.∀ end |
Instance Method Details
#∀ ⇒ Object Also known as: any
Generates random Fixnum
in the given interval.
77 78 79 |
# File 'lib/dsl/monkeypatches.rb', line 77 def ∀ rand(self) end |