Class: MistApi::CountSirtDistinctEnum
- Inherits:
-
Object
- Object
- MistApi::CountSirtDistinctEnum
- Defined in:
- lib/mist_api/models/count_sirt_distinct_enum.rb
Overview
count_sirt_distinct.
Constant Summary collapse
- COUNT_SIRT_DISTINCT_ENUM =
[ # TODO: Write general description for VERSIONS VERSIONS = 'versions'.freeze, # TODO: Write general description for MODELS MODELS = 'models'.freeze, # TODO: Write general description for SEVERITY SEVERITY = 'severity'.freeze, # TODO: Write general description for JSA_UPDATED_DATE JSA_UPDATED_DATE = 'jsa_updated_date'.freeze ].freeze
Class Method Summary collapse
Class Method Details
.from_value(value, default_value = VERSIONS) ⇒ Object
29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/mist_api/models/count_sirt_distinct_enum.rb', line 29 def self.from_value(value, default_value = VERSIONS) return default_value if value.nil? str = value.to_s.strip case str.downcase when 'versions' then VERSIONS when 'models' then MODELS when 'severity' then SEVERITY when 'jsa_updated_date' then JSA_UPDATED_DATE else default_value end end |
.validate(value) ⇒ Object
23 24 25 26 27 |
# File 'lib/mist_api/models/count_sirt_distinct_enum.rb', line 23 def self.validate(value) return false if value.nil? COUNT_SIRT_DISTINCT_ENUM.include?(value) end |