I am opening very big YAML file. It takes a while. But after it opened it it is printing all its content - and it takes many times more time for it.
So how can I avoid printing result in Ruby console:
data = YAML.load_file( ... ) # some 1GB data file.
I assume you are doing this in the console. I usually add just "; :ok" if I don't want to see the output.
data = YAML.load_file( ... ) ; :ok
In Pry you can suppress output just by adding the semicolon:
pry(main)> data = YAML.load_file( ... );
pry(main)>
Output suppression is explained in the wiki here
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With