Method: PulpContainerClient::ContainerContainerPullThroughRemote::EnumAttributeValidator#initialize

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

#initialize(datatype, allowable_values) ⇒ EnumAttributeValidator



90
91
92
93
94
95
96
97
98
99
100
101
# File 'lib/pulp_container_client/models/container_container_pull_through_remote.rb', line 90

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