Skip to content

Instantly share code, notes, and snippets.

@wycats
Created November 23, 2008 04:43
Show Gist options
  • Save wycats/28034 to your computer and use it in GitHub Desktop.
Save wycats/28034 to your computer and use it in GitHub Desktop.
klass.action_argument_list = Hash.new do |h,k|
args = klass.instance_method(k).get_args
arguments = args[0]
defaults = []
arguments.each {|a| defaults << a[0] if a.size == 2} if arguments
h[k] = [arguments || [], defaults]
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment