Ruby - Advanced Metaprogramming
You want to build a Ruby DSL that allows nested configuration like this:
config = Config.new do
database do
adapter 'sqlite3'
pool 5
end
cache do
enabled true
size 64
end
end
Which approach best supports this nested DSL pattern?