Sha256: bf1864aaa24d6eca610b830bf9c752fe61696258703c6f6f5a873e70afb610c4
Contents?: true
Size: 797 Bytes
Versions: 6
Compression:
Stored size: 797 Bytes
Contents
# frozen_string_literal: true module ActiveRecord module ConnectionAdapters module Elasticsearch module UnsupportedImplementation extend ActiveSupport::Concern class_methods do def define_unsupported_method(*method_names) method_names.each do |method_name| module_eval <<-RUBY, __FILE__, __LINE__ + 1 def #{method_name}(*args) raise NotImplementedError, "'##{method_name}' is originally defined by 'ActiveRecord::ConnectionAdapters' but is not supported by Elasticsearch. Choose a different solution to prevent the execution of this method!" end RUBY end end private :define_unsupported_method end end end end end
Version data entries
6 entries across 6 versions & 1 rubygems