write about capturing standard streams in ruby