Top Level Namespace

Defined Under Namespace

Modules: Churn

Instance Method Summary collapse

Instance Method Details

#report_churnObject



2
3
4
5
6
7
8
9
10
11
# 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