Created
November 23, 2008 04:43
-
-
Save wycats/28034 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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