I am not sold on some of the approaches outlined here - e.g. OpenStruct is a scourge that has no place in 99.9% of Ruby code. Also there’s a lot of ActiveSupport-related advices in here, which is an unnecessary dependency in many cases.
All in all, I don’t think this post shows the best solutions, but it DOES show some solutions that are commonly-encountered.
I am not sold on some of the approaches outlined here - e.g. OpenStruct is a scourge that has no place in 99.9% of Ruby code. Also there’s a lot of ActiveSupport-related advices in here, which is an unnecessary dependency in many cases.
All in all, I don’t think this post shows the best solutions, but it DOES show some solutions that are commonly-encountered.
How do YOU approach configuration?
Welp, it looks like nobody is going to jump in and contribute, so let me put forth one good Ruby solution:
dry-configurable