2018-08-03 13:22:24 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2017-05-24 06:25:44 -04:00
|
|
|
module ConversationalDevelopmentIndex
|
2019-03-28 09:17:42 -04:00
|
|
|
class Metric < ApplicationRecord
|
2017-05-24 06:25:44 -04:00
|
|
|
include Presentable
|
|
|
|
|
|
|
|
self.table_name = 'conversational_development_index_metrics'
|
|
|
|
|
|
|
|
def instance_score(feature)
|
|
|
|
self["instance_#{feature}"]
|
|
|
|
end
|
|
|
|
|
|
|
|
def leader_score(feature)
|
|
|
|
self["leader_#{feature}"]
|
|
|
|
end
|
|
|
|
|
|
|
|
def percentage_score(feature)
|
2017-08-01 02:46:43 -04:00
|
|
|
self["percentage_#{feature}"]
|
2017-05-24 06:25:44 -04:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|