debian-mirror-gitlab/elasticsearch-model/lib/elasticsearch/model/hash_wrapper.rb

16 lines
428 B
Ruby
Raw Normal View History

2020-03-09 13:42:32 +05:30
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