debian-mirror-gitlab/elasticsearch-rails/elasticsearch-model/lib/elasticsearch/model/hash_wrapper.rb
2021-03-05 16:19:46 +05:30

15 lines
428 B
Ruby

module Elasticsearch
module Model
# Subclass of `Hashie::Mash` to wrap Hash-like structures
# (responses from Elasticsearch, search definitions, etc)
#
# The primary goal of the subclass is to disable the
# warning being printed by Hashie for re-defined
# methods, such as `sort`.
#
class HashWrapper < ::Hashie::Mash
disable_warnings if respond_to?(:disable_warnings)
end
end
end