class Object

Public Instance Methods

report_churn() click to toggle source
# File lib/tasks/churn_tasks.rb, line 2
def report_churn()
  require File.join(File.dirname(__FILE__), '..', 'churn', 'calculator')
  options = {}
  { :minimum_churn_count => ENV['CHURN_MINIMUM_CHURN_COUNT'],
    :start_date          => ENV['CHURN_START_DATE'],
    :ignores        => ENV['CHURN_IGNORES'],
    :data_directory        => ENV['CHURN_DATA_DIRECTORY'],
  }.each {|k,v| options[k] = v unless v.nil? }
  Churn::ChurnCalculator.new(options).report
end