What's the __repr__ equivalence in ruby?
Posted
by prosseek
on Stack Overflow
See other posts from Stack Overflow
or by prosseek
Published on 2010-04-12T20:19:23Z
Indexed on
2010/04/12
20:23 UTC
Read the original article
Hit count: 212
The repr function is fancy as it is called when print OBJECT is used automatically?
Is there a ruby equivalence for it? I thought it was to_s, but, I had p OBJECT doesn't seem to call the to_s method.
© Stack Overflow or respective owner