Sha256: 8efd39d070d3d49033076858750ae6c3af8b5d43e80f44551b60248106a44540

Contents?: true

Size: 803 Bytes

Versions: 69

Compression:

Stored size: 803 Bytes

Contents

module Sunspot
  module SessionProxy
    class AbstractSessionProxy #:nodoc:
      class <<self
        def delegate(*args)
          options = Util.extract_options_from(args)
          delegate = options[:to]
          args.each do |method|
            module_eval(<<-RUBY, __FILE__, __LINE__ + 1)
              def #{method}(*args, &block)
                #{delegate}.#{method}(*args, &block)
              end
            RUBY
          end
        end

        def not_supported(*methods)
          methods.each do |method|
            module_eval(<<-RUBY, __FILE__, __LINE__ + 1)
              def #{method}(*args, &block)
                raise NotSupportedError, "#{name} does not support #{method.inspect}"
              end
            RUBY
          end
        end
      end
    end
  end
end

Version data entries

69 entries across 69 versions & 12 rubygems

Version Path
sunspot-2.7.1 lib/sunspot/session_proxy/abstract_session_proxy.rb
sunspot-2.7.0 lib/sunspot/session_proxy/abstract_session_proxy.rb
sunspot-2.6.0 lib/sunspot/session_proxy/abstract_session_proxy.rb
sunspot-2.5.0 lib/sunspot/session_proxy/abstract_session_proxy.rb
sunspot-2.4.0 lib/sunspot/session_proxy/abstract_session_proxy.rb
sunspot-2.3.0 lib/sunspot/session_proxy/abstract_session_proxy.rb
sunspot-2.2.8 lib/sunspot/session_proxy/abstract_session_proxy.rb
enju_leaf-1.2.1 vendor/bundle/ruby/2.3/gems/sunspot-2.2.7/lib/sunspot/session_proxy/abstract_session_proxy.rb
sunspot-2.2.7 lib/sunspot/session_proxy/abstract_session_proxy.rb
sunspot-2.2.6 lib/sunspot/session_proxy/abstract_session_proxy.rb
sunspot-2.2.5 lib/sunspot/session_proxy/abstract_session_proxy.rb
sunspot-2.2.4 lib/sunspot/session_proxy/abstract_session_proxy.rb
sunspot-2.2.3 lib/sunspot/session_proxy/abstract_session_proxy.rb
sunspot-2.2.2 lib/sunspot/session_proxy/abstract_session_proxy.rb
sunspot-2.2.1 lib/sunspot/session_proxy/abstract_session_proxy.rb
sunspot-2.2.0 lib/sunspot/session_proxy/abstract_session_proxy.rb
sunspot-2.1.1 lib/sunspot/session_proxy/abstract_session_proxy.rb
sunspot-2.1.0 lib/sunspot/session_proxy/abstract_session_proxy.rb
sunspot-2.0.0 lib/sunspot/session_proxy/abstract_session_proxy.rb
sunspot-2.0.0.pre.130115 lib/sunspot/session_proxy/abstract_session_proxy.rb