Ruby Objects Graph 12 Apr 2016 puts 'strict graph { rankdir="LR"' puts ObjectSpace.each_object(Module). select { |o| o.name unless o.to_s[/^Errno/] }. map { |o| o.ancestors.map { |a| %'"#{a}"' }.reverse * '--' } puts '}' $ ./test.rb > test.dot $ dot -Tjpg test.dot > test.jpg