I think S.O. is probably the best place to get answers to your questions. Just because you're new to the language doesn't mean that you can't ask an intelligent question...
Let's take a incredibly oversimplified example*:
# Hello world ruby program
puts "Hello World!";
Example bad question:
im a noob to Ruby can some one tell me how this works?
Example good question:
I'm new to Ruby and I found this example. I was able to run it and saw the output "Hello World!", but when I was perusing the documentation for
puts() here I saw it was equivalent to
$stdout.puts(obj, ...), what if I want to instead have
puts() send it to a file instead of stdout?
The first question is bad, I don't know why anyone would ask it and it's going to be closed. It shows no effort, (it's going to get comments like "try it and see") and it's not asking a specific question just a code dump and a question mark.
The second question is much better, it shows effort (you compiled it and got the output, as well as shows some searching online to get to the documentation) and it also asked a specific question (how do you redirect the output of
Again, this example is too simplified (a quick google search of "Ruby puts to a file") gives a bunch of results, but as long as the effort is there I would suspect some decent answers, maybe even an up vote or two.
*I don't know Ruby, so the code could be wrong, but you get the idea