Method: AutosdeOpenapiClient::Address::EnumAttributeValidator#initialize
- Defined in:
- lib/autosde_openapi_client/models/address.rb
#initialize(datatype, allowable_values) ⇒ EnumAttributeValidator
Returns a new instance of EnumAttributeValidator.
46 47 48 49 50 51 52 53 54 55 56 57 |
# File 'lib/autosde_openapi_client/models/address.rb', line 46 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 |