Class: Sunspot::SessionProxy::SilentFailSessionProxy

Inherits:
AbstractSessionProxy show all
Defined in:
lib/sunspot/session_proxy/silent_fail_session_proxy.rb

Constant Summary collapse

SUPPORTED_METHODS =
[
  :batch, :commit, :commit_if_dirty, :commit_if_delete_dirty, :dirty?,
  :index!, :index, :optimize, :remove!, :remove, :remove_all!, :remove_all,
  :remove_by_id!, :remove_by_id
]

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from AbstractSessionProxy

delegate, not_supported

Constructor Details

#initialize(search_session = Sunspot.session) ⇒ SilentFailSessionProxy

Returns a new instance of SilentFailSessionProxy.



14
15
16
# File 'lib/sunspot/session_proxy/silent_fail_session_proxy.rb', line 14

def initialize(search_session = Sunspot.session)
  @search_session = search_session
end

Instance Attribute Details

#search_sessionObject (readonly)

Returns the value of attribute search_session.



7
8
9
# File 'lib/sunspot/session_proxy/silent_fail_session_proxy.rb', line 7

def search_session
  @search_session
end

Instance Method Details

#rescued_exception(method, e) ⇒ Object



18
19
20
# File 'lib/sunspot/session_proxy/silent_fail_session_proxy.rb', line 18

def rescued_exception(method, e)
  $stderr.puts("Exception in #{method}: #{e.message}")
end