Method: OryClient::Project::EnumAttributeValidator#initialize

Defined in:
lib/ory-client/models/project.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/ory-client/models/project.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