Pastie now auto-senses if line-wrap is a bad or good idea. Feedback?
## mark a section (Learn more)
This paste will be private.
require 'rubygems' require 'parse_tree' module OtherActions def update(id, page) end end class Pages include OtherActions def show(id) end end puts ParseTree.translate(Pages, :show).inspect # => [:defn, :show, [:scope, [:block, [:args, :id], [:nil]]]] puts ParseTree.translate(Pages, :update).inspect # => [nil]
Pasted April 06, 2008 4:36PM EDT
Embed