Module: Elasticsearch::Persistence::ClassMethods
- Included in:
- Elasticsearch::Persistence
- Defined in:
- lib/elasticsearch/persistence.rb
Overview
:nodoc:
Instance Method Summary collapse
-
#client(client = nil) ⇒ Object
Get or set the default client for all repositories and models.
-
#client=(client) ⇒ Object
Set the default client for all repositories and models.
Instance Method Details
#client(client = nil) ⇒ Object
Get or set the default client for all repositories and models
95 96 97 |
# File 'lib/elasticsearch/persistence.rb', line 95 def client client=nil @client = client || @client || Elasticsearch::Client.new end |
#client=(client) ⇒ Object
Set the default client for all repositories and models
106 107 108 |
# File 'lib/elasticsearch/persistence.rb', line 106 def client=(client) @client = client end |