summaryrefslogtreecommitdiff
path: root/app/models/conversational_development_index/metric.rb
blob: c54537572d6676631cd4e668c3a98d8d3346966c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# frozen_string_literal: true

module ConversationalDevelopmentIndex
  class Metric < ActiveRecord::Base
    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