Sha256: 57fbb5849c58825a7e9a493ff82b2d61c0576cf700403f83841aff714d20d042

Contents?: true

Size: 237 Bytes

Versions: 9

Compression:

Stored size: 237 Bytes

Contents

module VGen
  class FloatGen
    def initialize(
          range=(-10..10)
        )
      @range = range
    end

    def call()
      Random.new.rand(
        (@range.min.to_f..@range.max.to_f)
      )
    end
  end
end

Version data entries

9 entries across 7 versions & 2 rubygems

Version Path
bsielski_control_flow-1.0.0 vendor/bundle/ruby/2.5.0/gems/bsielski_value_generator-1.4.0/lib/v_gen/float_gen.rb
bsielski_control_flow-1.0.0 vendor/bundle/ruby/2.5.0/gems/bsielski_value_generator-1.3.0/lib/v_gen/float_gen.rb
bsielski_control_flow-1.0.0 vendor/bundle/ruby/2.5.0/gems/bsielski_value_generator-1.2.0/lib/bsielski_v_gen/float_gen.rb
bsielski_value_generator-1.4.0 lib/v_gen/float_gen.rb
bsielski_value_generator-1.3.0 lib/v_gen/float_gen.rb
bsielski_value_generator-1.2.0 lib/bsielski_v_gen/float_gen.rb
bsielski_value_generator-1.1.0 lib/bsielski_v_gen/float_gen.rb
bsielski_value_generator-1.0.1 lib/bsielski_v_gen/float_gen.rb
bsielski_value_generator-1.0.0 lib/bsielski_v_gen/float_gen.rb