Method: PulpContainerClient::ContainerContainerRemote::EnumAttributeValidator#initialize

Defined in:
lib/pulp_container_client/models/container_container_remote.rb

#initialize(datatype, allowable_values) ⇒ EnumAttributeValidator

Returns a new instance of EnumAttributeValidator.



97
98
99
100
101
102
103
104
105
106
107
108
# File 'lib/pulp_container_client/models/container_container_remote.rb', line 97

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