module YourApp
class Application < Rails::Application
config.my_custom_variable = :custom_value
end
end
This works in my Rails application. I just want to understand how this works from ruby perspective. As per to my minimal ruby knowledge, there must be getter and setter(my_custom_variable=) for my_custom_variable in the config(Rails::Application::Configuration) object. Since this is my custom variable this will not be present in the Configuration object instance. How is it dynamically created/added. ?
Can somebody please explain?, direct me to the proper documentation to understand this.