lib/algolia/models/search/synonym_hit.rb in algolia-3.2.2 vs lib/algolia/models/search/synonym_hit.rb in algolia-3.2.3
- old
+ new
@@ -28,31 +28,9 @@
attr_accessor :placeholder
# Query words that will match the [placeholder token](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/adding-synonyms/in-depth/synonyms-placeholders/).
attr_accessor :replacements
- class EnumAttributeValidator
- attr_reader :datatype
- attr_reader :allowable_values
-
- 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
-
- def valid?(value)
- !value || allowable_values.include?(value)
- end
- end
-
# Attribute mapping from ruby-style variable name to JSON key.
def self.attribute_map
{
:object_id => :objectID,
:type => :type,