In Ruby, is there the equivalent of the __str__()
method that you can define on Python classes?
You could use to_s.
http://briancarper.net/2006/09/26/ruby-to_s-vs-to_str/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With