I need to check if a given object is an instance of a range of
Classes, and I was wondering if I could do it by passing in is_a? an
hash of classes, instead of calling is_a? for each class I have to
compare...
As I state in the subject (obj.is_one_of? {Class1, Class2, ...}), this
could justify a method "obj.is_one_of?" which returns true if the
object "obj" is an instance of Class1 or Class2...
Is there something that I'm missing?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---