Malbourne makes it possible to generate abstract syntax trees (AST) from arbitrary Ruby source code by leveraging Rubinius' parser component (without the need to actually run Rubinius).
Evan Phoenix, Marco Otte-Witte
gem "melbourne", "~> 1.0.1"