Class: Noiseless::Configuration
- Inherits:
-
Object
- Object
- Noiseless::Configuration
- Defined in:
- lib/noiseless.rb
Instance Attribute Summary collapse
-
#config_path ⇒ Object
Returns the value of attribute config_path.
-
#connections_config ⇒ Object
Returns the value of attribute connections_config.
-
#default_adapter ⇒ Object
Returns the value of attribute default_adapter.
-
#default_connection ⇒ Object
Returns the value of attribute default_connection.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
38 39 40 41 42 43 44 45 46 47 48 49 |
# File 'lib/noiseless.rb', line 38 def initialize @connections_config = {} @default_connection = :primary @default_adapter = :opensearch @config_path = lambda do if defined?(Rails) && Rails.respond_to?(:root) && Rails.root Rails.root.join("config/noiseless.yml") else File.("config/noiseless.yml", Dir.pwd) end end end |
Instance Attribute Details
#config_path ⇒ Object
Returns the value of attribute config_path.
36 37 38 |
# File 'lib/noiseless.rb', line 36 def config_path @config_path end |
#connections_config ⇒ Object
Returns the value of attribute connections_config.
36 37 38 |
# File 'lib/noiseless.rb', line 36 def connections_config @connections_config end |
#default_adapter ⇒ Object
Returns the value of attribute default_adapter.
36 37 38 |
# File 'lib/noiseless.rb', line 36 def default_adapter @default_adapter end |
#default_connection ⇒ Object
Returns the value of attribute default_connection.
36 37 38 |
# File 'lib/noiseless.rb', line 36 def default_connection @default_connection end |