class Elasticsearch::Resources::Configuration::Cluster
Public Instance Methods
client()
click to toggle source
# File lib/elasticsearch/resources/configuration/cluster.rb, line 5 def client @client ||= Elasticsearch::Client.new(host: host) end
host()
click to toggle source
# File lib/elasticsearch/resources/configuration/cluster.rb, line 19 def host @host ||= '127.0.0.1:9200' end
host=(host)
click to toggle source
# File lib/elasticsearch/resources/configuration/cluster.rb, line 23 def host=(host) raise NullHostError.new if host.nil? @host = host end
index(key) { |t| ... }
click to toggle source
# File lib/elasticsearch/resources/configuration/cluster.rb, line 13 def index(key) indexes[key.to_sym].tap do |t| yield(t) if block_given? end end
indexes()
click to toggle source
# File lib/elasticsearch/resources/configuration/cluster.rb, line 9 def indexes @indexes ||= default_indexes end
Protected Instance Methods
default_indexes()
click to toggle source
# File lib/elasticsearch/resources/configuration/cluster.rb, line 40 def default_indexes {} end