If you understand the first two, the last two should give you no 
trouble.

1) The method takes in some Strings as arguments.
2) The method creates a "result" String to be returned.
3) The method inserts the arguments (name, value, errors) into the "HTML 
tag" Strings using "interpolation"
4) The method appends other predefined "HTML tag" Strings to the 
"result" String
5) The method returns the "result" implicitly.

Now:
Go and read some introductory guides.
Look up all the words which are new to you.
Install Ruby and play with IRB, as previously mentioned. Play is the 
best way to learn.

-- 
Posted via http://www.ruby-forum.com/.