class Druid::PostAggregation::FnValidator
Constants
- TYPES
Public Instance Methods
validate_each(record, attribute, value)
click to toggle source
# File lib/druid/post_aggregation.rb, line 24 def validate_each(record, attribute, value) if TYPES.include?(record.type) record.errors.add(attribute, 'must be a valid arithmetic operation') unless %w(+ - * /).include?(value) else record.errors.add(attribute, "is not supported by type=#{record.type}") if value end end