fl00r
fl00r

Reputation: 83680

Avoid printing after executing command in console

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

Answers (2)

horseyguy
horseyguy

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

sunkencity
sunkencity

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

Related Questions