Should doc patches be sent here?
There's a typo in the example, I noticed when I pasted it.
Also, I spend a half-hour debugging last night, trying to figure out
what '' meant... I thought it was being used as a magic sign to write
to stdout, then I read the code. So, I think it could be more clear,
its a little subtle right now.
Also, there was a mixture of +arg+ and <tt>arg</tt>.
Can this be applied?
Thanks,
Sam
Index: rdoc/template.rb
===================================================================
RCS file: /src/ruby/lib/rdoc/template.rb,v
retrieving revision 1.1
diff -u -r1.1 template.rb
--- rdoc/template.rb 1 Dec 2003 07:12:48 -0000 1.1
+++ rdoc/template.rb 12 Nov 2004 01:50:36 -0000
@@ -25,13 +25,13 @@
#
# Usage: Given a set of templates <tt>T1, T2,</tt> etc
#
-# values = { "name" => "Dave", state => "TX" }
+# values = { "name" => "Dave", "state" => "TX" }
#
# t = TemplatePage.new(T1, T2, T3)
# File.open(name, "w") {|f| t.write_html_on(f, values)}
# or
# res = ''
-# t.write_html_on(res, values)
+# puts t.write_html_on(res, values)
#
#
@@ -138,7 +138,9 @@
end
# Render the templates into HTML, storing the result on +op+
- # using the method <tt><<</tt>. The <tt>value_hash</tt> contains
+ # using the method <tt><<</tt>. Returns +op+. If you want
+ # the template as a String, pass '' as +op+, and the template
+ # will be appended to the end and returned. The +value_hash+ contains
# key/value pairs used to drive the substitution (as described above)
def write_html_on(op, value_hash)
@@ -195,7 +197,7 @@
result.join("\n")
end
- # Given an individual line, we look for %xxx% constructs and
+ # Given an individual +line+, we look for %xxx% constructs and
# HREF:ref:name: constructs, substituting for each.
def expand_line(line)
|