Method: Kickflow::UserDetail::EnumAttributeValidator#initialize
- Defined in:
- lib/kickflow/models/user_detail.rb
#initialize(datatype, allowable_values) ⇒ EnumAttributeValidator
Returns a new instance of EnumAttributeValidator.
61 62 63 64 65 66 67 68 69 70 71 72 |
# File 'lib/kickflow/models/user_detail.rb', line 61 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 |