Is it a string class instance : instance_of « Reflection « Ruby
- Ruby
- Reflection
- instance_of
Is it a string class instance
o = "String"
o.class == String # true if is o a String
o.instance_of? String # true if o is a String
Related examples in the same category