Convert to String « String « Ruby






1.call the to_s method on many built-in classes to return the contents of the object as a string
2.Convert an object to a string with to_s.
3.change the output on the fly with the %s format flag and %: