Class: Elasticity::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/elasticity/config.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#namespaceObject



20
21
22
# File 'lib/elasticity/config.rb', line 20

def namespace
  @namespace
end

#pretty_jsonObject



24
25
26
# File 'lib/elasticity/config.rb', line 24

def pretty_json
  @pretty_json || false
end

#settingsObject



15
16
17
18
# File 'lib/elasticity/config.rb', line 15

def settings
  return @settings if defined?(@settings)
  @settings = {}
end

Instance Method Details

#clientObject



7
8
9
10
11
# File 'lib/elasticity/config.rb', line 7

def client
  return @client if defined?(@client)
  self.client = Elasticsearch::Client.new
  @client
end

#client=(client) ⇒ Object



3
4
5
# File 'lib/elasticity/config.rb', line 3

def client=(client)
  @client = Elasticity::InstrumentedClient.new(client)
end