Class: ActiveEs::Configurations

Inherits:
Object
  • Object
show all
Defined in:
lib/active_es/configurations.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfigurations

Returns a new instance of Configurations.



5
6
7
8
9
10
# File 'lib/active_es/configurations.rb', line 5

def initialize
  load_confing = YAML.load_file(Rails.root.join('config', 'searchengine.yml'))
  config = load_confing[Rails.env]
  @connection_url = "#{config["host"]}:#{config["port"]}"
  @index = config["index"]
end

Instance Attribute Details

#connection_urlObject (readonly)

Returns the value of attribute connection_url.



3
4
5
# File 'lib/active_es/configurations.rb', line 3

def connection_url
  @connection_url
end

#indexObject (readonly)

Returns the value of attribute index.



3
4
5
# File 'lib/active_es/configurations.rb', line 3

def index
  @index
end