I am using the ruby 'configuration' gem for a project. Currently, I have an app class in my project module, and to get configuration, calling App.config
returns the Configuration object.
In my classes to access a nested config variable, I would call App.config.rabbitmq.host
. However, this isn't working because rabbitmq is returning a hash.
base = Configuration.for('default') {
rabbitmq {
host 'localhost'
port 5672
username 'guest'
password 'guest'
vhost '/'
}
}
That is how my configuration looks. It is inherited by the actual configuration object i am using:
Configuration.for('development', base) {
}
What am I doing wrong? I required the configuration gem in the classes where I am accessing the nested config.
Thanks