Studying Ruby and the Do block. Coming from much c# I didn't see much that reminded me of Do, but then VB came to mind with the With statement and one which I wish was in c# (maybe it is and I never saw it?). The two statements, Do and With, appear similar.
Is the With statement in VB the same as a Do block in Ruby?
EDIT:
Take this example, ActiveRecord object TheBook, maps to database table:
TheBook.new do |book|
book.title = "my book"
book.writer = "some author"
end
I understand what I will get just from looking at it. I know that I will get a new record in my database with the above information, but I do not know why. Why did book become TheBook.new? Do I read it from right to left?