Class: ActiveWarehouse::Builder::FloatGenerator
- Inherits:
-
Object
- Object
- ActiveWarehouse::Builder::FloatGenerator
- Defined in:
- lib/active_warehouse/builder/random_data_builder.rb
Overview
Basic Float generator
Instance Method Summary collapse
-
#generate(column, options = {}) ⇒ Object
Generate a float from 0 to options inclusive (default 1000).
Instance Method Details
#generate(column, options = {}) ⇒ Object
Generate a float from 0 to options inclusive (default 1000)
Options:
-
:max
: The maximum allowed value (default 1000)
167 168 169 170 |
# File 'lib/active_warehouse/builder/random_data_builder.rb', line 167 def generate(column, ={}) [:max] ||= 1000 rand * [:max].to_f end |