Method: Onfido::WebhookEventPayloadObject::EnumAttributeValidator#initialize
- Defined in:
- lib/onfido/models/webhook_event_payload_object.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/onfido/models/webhook_event_payload_object.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 |