Class: Athenian::ReleaseMetricID
- Inherits:
-
Object
- Object
- Athenian::ReleaseMetricID
- Defined in:
- lib/athenian/models/release_metric_id.rb
Constant Summary collapse
- COUNT =
'release-count'.freeze
- TAG_COUNT =
'release-tag-count'.freeze
- BRANCH_COUNT =
'release-branch-count'.freeze
- PRS =
'release-prs'.freeze
- TAG_PRS =
'release-tag-prs'.freeze
- BRANCH_PRS =
'release-branch-prs'.freeze
- COMMITS =
'release-commits'.freeze
- TAG_COMMITS =
'release-tag-commits'.freeze
- BRANCH_COMMITS =
'release-branch-commits'.freeze
- LINES =
'release-lines'.freeze
- TAG_LINES =
'release-tag-lines'.freeze
- BRANCH_LINES =
'release-branch-lines'.freeze
- AVG_PRS =
'release-avg-prs'.freeze
- TAG_AVG_PRS =
'release-tag-avg-prs'.freeze
- BRANCH_AVG_PRS =
'release-branch-avg-prs'.freeze
- AVG_COMMITS =
'release-avg-commits'.freeze
- TAG_AVG_COMMITS =
'release-tag-avg-commits'.freeze
- BRANCH_AVG_COMMITS =
'release-branch-avg-commits'.freeze
- AVG_LINES =
'release-avg-lines'.freeze
- TAG_AVG_LINES =
'release-tag-avg-lines'.freeze
- BRANCH_AVG_LINES =
'release-branch-avg-lines'.freeze
- AGE =
'release-age'.freeze
- TAG_AGE =
'release-tag-age'.freeze
- BRANCH_AGE =
'release-branch-age'.freeze
- TIME_TO_DEPLOY =
'release-time-to-deploy'.freeze
Class Method Summary collapse
- .all_vars ⇒ Object
-
.build_from_hash(value) ⇒ String
Builds the enum from string.
Instance Method Summary collapse
-
#build_from_hash(value) ⇒ String
Builds the enum from string.
Class Method Details
.all_vars ⇒ Object
41 42 43 |
# File 'lib/athenian/models/release_metric_id.rb', line 41 def self.all_vars @all_vars ||= [COUNT, TAG_COUNT, BRANCH_COUNT, PRS, TAG_PRS, BRANCH_PRS, COMMITS, TAG_COMMITS, BRANCH_COMMITS, LINES, TAG_LINES, BRANCH_LINES, AVG_PRS, TAG_AVG_PRS, BRANCH_AVG_PRS, AVG_COMMITS, TAG_AVG_COMMITS, BRANCH_AVG_COMMITS, AVG_LINES, TAG_AVG_LINES, BRANCH_AVG_LINES, AGE, TAG_AGE, BRANCH_AGE, TIME_TO_DEPLOY].freeze end |
.build_from_hash(value) ⇒ String
Builds the enum from string
48 49 50 |
# File 'lib/athenian/models/release_metric_id.rb', line 48 def self.build_from_hash(value) new.build_from_hash(value) end |
Instance Method Details
#build_from_hash(value) ⇒ String
Builds the enum from string
55 56 57 58 |
# File 'lib/athenian/models/release_metric_id.rb', line 55 def build_from_hash(value) return value if ReleaseMetricID.all_vars.include?(value) raise "Invalid ENUM value #{value} for class #ReleaseMetricID" end |