Method: Propertyware::OwnerDraw::EnumAttributeValidator#initialize
- Defined in:
- lib/propertyware/models/owner_draw.rb
#initialize(datatype, allowable_values) ⇒ EnumAttributeValidator
Returns a new instance of EnumAttributeValidator.
65 66 67 68 69 70 71 72 73 74 75 76 |
# File 'lib/propertyware/models/owner_draw.rb', line 65 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 |