Sha256: e1e62254d3cb60cae174dc6b6c537c29b592254f1a54bee4d3c84dd6309e47fe

Contents?: true

Size: 507 Bytes

Versions: 52

Compression:

Stored size: 507 Bytes

Contents

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

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

    attr_writer :settings, :namespace, :pretty_json

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

    def namespace
      @namespace
    end

    def pretty_json
      @pretty_json || false
    end
  end
end

Version data entries

52 entries across 52 versions & 1 rubygems

Version Path
es-elasticity-0.8.3 lib/elasticity/config.rb
es-elasticity-0.8.2 lib/elasticity/config.rb
es-elasticity-0.8.1 lib/elasticity/config.rb
es-elasticity-0.8.0 lib/elasticity/config.rb
es-elasticity-0.7.1 lib/elasticity/config.rb
es-elasticity-0.7.0 lib/elasticity/config.rb
es-elasticity-0.6.5 lib/elasticity/config.rb
es-elasticity-0.6.4 lib/elasticity/config.rb
es-elasticity-0.6.3 lib/elasticity/config.rb
es-elasticity-0.6.2 lib/elasticity/config.rb
es-elasticity-0.6.1 lib/elasticity/config.rb
es-elasticity-0.6.0 lib/elasticity/config.rb
es-elasticity-0.5.2 lib/elasticity/config.rb
es-elasticity-0.5.1 lib/elasticity/config.rb
es-elasticity-0.5.0 lib/elasticity/config.rb
es-elasticity-0.4.5 lib/elasticity/config.rb
es-elasticity-0.4.4 lib/elasticity/config.rb
es-elasticity-0.4.3 lib/elasticity/config.rb
es-elasticity-0.4.2 lib/elasticity/config.rb
es-elasticity-0.3.10 lib/elasticity/config.rb