Class: Athenian::DeveloperMetricID
- Inherits:
-
Object
- Object
- Athenian::DeveloperMetricID
- Defined in:
- lib/athenian/models/developer_metric_id.rb
Constant Summary collapse
- COMMITS_PUSHED =
'dev-commits-pushed'.freeze
- LINES_CHANGED =
'dev-lines-changed'.freeze
- PRS_CREATED =
'dev-prs-created'.freeze
- PRS_REVIEWED =
'dev-prs-reviewed'.freeze
- PRS_MERGED =
'dev-prs-merged'.freeze
- RELEASES =
'dev-releases'.freeze
- REVIEWS =
'dev-reviews'.freeze
- REVIEW_APPROVALS =
'dev-review-approvals'.freeze
- REVIEW_REJECTIONS =
'dev-review-rejections'.freeze
- REVIEW_NEUTRALS =
'dev-review-neutrals'.freeze
- PR_COMMENTS =
'dev-pr-comments'.freeze
- REGULAR_PR_COMMENTS =
'dev-regular-pr-comments'.freeze
- REVIEW_PR_COMMENTS =
'dev-review-pr-comments'.freeze
- ACTIVE =
'dev-active'.freeze
- ACTIVE0 =
'dev-active0'.freeze
- WORKED =
'dev-worked'.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
32 33 34 |
# File 'lib/athenian/models/developer_metric_id.rb', line 32 def self.all_vars @all_vars ||= [COMMITS_PUSHED, LINES_CHANGED, PRS_CREATED, PRS_REVIEWED, PRS_MERGED, RELEASES, REVIEWS, REVIEW_APPROVALS, REVIEW_REJECTIONS, REVIEW_NEUTRALS, PR_COMMENTS, REGULAR_PR_COMMENTS, REVIEW_PR_COMMENTS, ACTIVE, ACTIVE0, WORKED].freeze end |
.build_from_hash(value) ⇒ String
Builds the enum from string
39 40 41 |
# File 'lib/athenian/models/developer_metric_id.rb', line 39 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
46 47 48 49 |
# File 'lib/athenian/models/developer_metric_id.rb', line 46 def build_from_hash(value) return value if DeveloperMetricID.all_vars.include?(value) raise "Invalid ENUM value #{value} for class #DeveloperMetricID" end |