[Rails] Re: Determine if a value is an instance of String , or Array

Tore Darell toredarell at gmail.com
Sat Mar 4 19:16:15 GMT 2006


object.is_a?(ClassName) does this.

object.class returns the class.

oo00oo wrote:
> Thanks for the tips
> inline rescue is nice !
> But I'm always searching a method to determine a type. For Arrays, 
> Hashs...

-- 
Posted via http://www.ruby-forum.com/.


More information about the Rails mailing list