Difference between to_s and inspect in Ruby

7

While running a script in Ruby, we usually want to log data from objects for debugging purpose. puts, p, logger methods are used to log along with to_s, inspect methods to log object. This tutorial will give brief about each method and when to use which o

Read this post on rubyinrails.com


Akshay

blogs from Pune