Ruby console [IRB] echoes the output of last line executed. Sometimes, when data to output is huge, it is quite troublesome. To disable echo in IRB, we need set a echo flag on conf to false.
we have an access to
Disable echo on IRB console
To disable to output of last executed line,
we can set
By default, it has
true value as given below.
false as given below.
Now, IRB console won’t output anything unless explicitly asked for
The above line doesn’t output anything.
If we want to output something,
we can use
puts as given below.
to check if conf is set to
Note: This will only output result only if conf.echo? is set to
Subscribe to Ruby in Rails
Get the latest posts delivered right to your inbox