Module: Abingo::ConversionRate

Included in:
Alternative, Experiment
Defined in:
lib/abingo/conversion_rate.rb

Instance Method Summary collapse

Instance Method Details

#conversion_rateObject



2
3
4
# File 'lib/abingo/conversion_rate.rb', line 2

def conversion_rate
  1.0 * conversions / participants
end

#pretty_conversion_rateObject



6
7
8
# File 'lib/abingo/conversion_rate.rb', line 6

def pretty_conversion_rate
  sprintf("%4.2f%%", conversion_rate * 100)
end