If you know about Ripper, you know that it’s a bridge between the ruby language parser and your own ruby app. It lets you parse ruby files just as ruby would see them. It’s currently marked as experimental, but its been in ruby since 1.9.