2018-11-20 20:47:30 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2017-09-10 17:25:29 +05:30
|
|
|
module ConversationalDevelopmentIndex
|
2019-05-18 00:54:41 +05:30
|
|
|
class Metric < ApplicationRecord
|
2017-09-10 17:25:29 +05:30
|
|
|
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)
|
|
|
|
self["percentage_#{feature}"]
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|