Reputation: 83680
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.
Upvotes: 8
Views: 2874
Reputation: 29895
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
Upvotes: 14
Reputation: 3472
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
Upvotes: 16