-
-
Notifications
You must be signed in to change notification settings - Fork 5
Closed
Labels
Description
Steps to reproduce:
When attempting to produce an export when a test is present without enough participants to calculate the statistical confidence, exports raise an exception attempting to convert the string "N/A" to a float.
> csv_data = Split::Export.to_csv
ArgumentError: invalid value for BigDecimal(): "N/A"
from /Users/markb/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/split-export-2.0.0/lib/split/export.rb:10:in `initialize'
Could it convert the number to an integer instead of a string to give a value of 0.0?
[5] pry(main)> BigDecimal.new("NA".to_i).round(2).to_f
=> 0.0