Steve L
4/21/2006 2:58:00 AM
Hello,
I'm trying to learn more about ruby by reading some of the source code
for ruby on rails. I was just looking at the method assert_valid_keys. The
code for the method is as follows
# File activesupport/lib/active_support/core_ext/hash/keys.rb, line 46
def assert_valid_keys(*valid_keys)
unknown_keys = keys - [valid_keys].flatten
raise(ArgumentError, "Unknown key(s): #{unknown_keys.join(", ")}") unless
unknown_keys.empty?
endWhat I am puzzled by is that I don't understand where/how the variable
'keys' is defined?Could someone please help me understand this better?
Janak