Class: VGen::IntGen
- Inherits:
-
Object
- Object
- VGen::IntGen
- Defined in:
- lib/v_gen/int_gen.rb
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(range = (0..10)) ⇒ IntGen
constructor
A new instance of IntGen.
Constructor Details
#initialize(range = (0..10)) ⇒ IntGen
Returns a new instance of IntGen.
3 4 5 6 7 |
# File 'lib/v_gen/int_gen.rb', line 3 def initialize( range=(0..10) ) @range = range end |
Instance Method Details
#call ⇒ Object
9 10 11 |
# File 'lib/v_gen/int_gen.rb', line 9 def call() Random.new.rand(@range) end |