Integer passed into a string with interpolation : Convert to String « Number « Ruby





Integer passed into a string with interpolation


x = 2
print "This application is running okay if 2 + 2 = #{x + x}"

 

Related examples in the same category

1.Substituting Variables Into Strings
2.constant value interpolation
3.String interpolation with method call
4.String interpolation with calculation
5.Convert float to string
6.Convert integer to string by parameter
7.Convert string to integer with error