Class: ActiveEs::Configurations
- Inherits:
-
Object
- Object
- ActiveEs::Configurations
- Defined in:
- lib/active_es/configurations.rb
Instance Attribute Summary collapse
-
#connection_url ⇒ Object
readonly
Returns the value of attribute connection_url.
-
#index ⇒ Object
readonly
Returns the value of attribute index.
Instance Method Summary collapse
-
#initialize ⇒ Configurations
constructor
A new instance of Configurations.
Constructor Details
#initialize ⇒ Configurations
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_url ⇒ Object (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 |
#index ⇒ Object (readonly)
Returns the value of attribute index.
3 4 5 |
# File 'lib/active_es/configurations.rb', line 3 def index @index end |