Ruby - Classes and Objects
In Ruby, what is the primary role of the
to_s method?to_s method?to_s methodto_s method is used to get a string representation of an object in Ruby.to_s.123.to_s #=> "123" [OK]15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions