Fixed var spelling errors. Accept more types for hints args.

This commit is contained in:
Jim Menard 2009-01-14 10:26:12 -05:00
parent ae9c1f508a
commit b8fcd28c51
1 changed files with 12 additions and 4 deletions

View File

@ -31,11 +31,19 @@ module XGen
end end
# Set hint fields to use and return +self+. hint_fields may be a # Set hint fields to use and return +self+. hint_fields may be a
# single field name or array of field names. May be +nil+. If no hint # single field name, array of field names, or a hash whose keys will
# fields are specified, the ones in the collection are used if they # become the hint field names. May be +nil+.
# exist.
def hint(hint_fields) def hint(hint_fields)
@hint_fileds = hint_fileds @hint_fields = case hint_fields
when String
[hint_fields]
when Hash
hint_fields.keys
when nil
nil
else
hint_fields.to_a
end
self self
end end