Method: PulpFileClient::FileFileRemoteResponse::EnumAttributeValidator#initialize

Defined in:
lib/pulp_file_client/models/file_file_remote_response.rb

#initialize(datatype, allowable_values) ⇒ EnumAttributeValidator

Returns a new instance of EnumAttributeValidator.



84
85
86
87
88
89
90
91
92
93
94
95
# File 'lib/pulp_file_client/models/file_file_remote_response.rb', line 84

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