Method: Fastly::LoggingAzureblob::EnumAttributeValidator#initialize

Defined in:
lib/fastly/models/logging_azureblob.rb

#initialize(datatype, allowable_values) ⇒ EnumAttributeValidator



68
69
70
71
72
73
74
75
76
77
78
79
# File 'lib/fastly/models/logging_azureblob.rb', line 68

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