Method: Harbor2Client::Stats::EnumAttributeValidator#initialize
- Defined in:
- lib/harbor2_client/models/stats.rb
#initialize(datatype, allowable_values) ⇒ EnumAttributeValidator
Returns a new instance of EnumAttributeValidator.
37 38 39 40 41 42 43 44 45 46 47 48 |
# File 'lib/harbor2_client/models/stats.rb', line 37 def initialize(datatype, allowable_values) @allowable_values = allowable_values.map do |value| case datatype.to_s when /Integer/i value.to_i when /Float/i value.to_f else value end end end |