Class: Sunspot::SessionProxy::SilentFailSessionProxy

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

Constant Summary

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

- (SilentFailSessionProxy) initialize(search_session = Sunspot.session)

A new instance of SilentFailSessionProxy



14
15
16
# File 'sunspot/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

- (Object) search_session (readonly)

Returns the value of attribute search_session



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

def search_session
  @search_session
end

Instance Method Details

- (Object) rescued_exception(method, e)



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

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