Method: Fastly::LoggingFtpResponse::EnumAttributeValidator#initialize

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

#initialize(datatype, allowable_values) ⇒ EnumAttributeValidator

Returns a new instance of EnumAttributeValidator.



87
88
89
90
91
92
93
94
95
96
97
98
# File 'lib/fastly/models/logging_ftp_response.rb', line 87

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