anyone know of a better way to make sure all items in an array are instances of the same class? specifically i want to make sure they're all instances of the same AR class.

This just doesn't seem the best way:

def method
  object_class = array.first.class
  array.each do | record |
    raise ArgumentError unless record.class == object_class
  end
end
_______________________________________________
Sdruby mailing list
[email protected]
http://lists.sdruby.com/mailman/listinfo/sdruby

Reply via email to