lib/fakeit/openapi/example/number_example.rb in fakeit-0.2.1 vs lib/fakeit/openapi/example/number_example.rb in fakeit-0.3.0
- old
+ new
@@ -3,10 +3,14 @@
module Example
MIN_NUM = -2**31
MAX_NUM = 2**31 - 1
def number_example(example_options)
- example_options[:static] ? static_number_example : random_number_example
+ if example_options[:use_static][type: 'number', property: example_options[:property]]
+ static_number_example
+ else
+ random_number_example
+ end
end
private
def static_number_example