debian-mirror-gitlab/elasticsearch-model/lib/elasticsearch/model/hash_wrapper.rb
2020-03-13 15:44:24 +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