From: "trans. (T. Onoma)" Date: 2004-10-20T14:04:36+09:00 Subject: Re: documentation as source On Wednesday 20 October 2004 12:07 am, "Pe単a, Botp" wrote: | > # # This creates a Regexp which will match 3 "foo"s. | > # re = Regexp::English.literal("foo" * 3) | > # re.match("foofoofoo")[0] # => "foofoofoo" | | many times, I have multi-# on a line on my code. Blame me lazy and my | editor | | :-) At least you write comments! Me the L:) | is it possible to put (Example) tags? =) | | # #Example: This creates a Regexp which will match 3 "foo"s. | # re = Regexp::English.literal("foo" * 3) | # re.match("foofoofoo")[0] # => "foofoofoo" | # #EndExample <-- this would be optional if it hits another #Example | | indents not needed of course. In that case there is always markup: # # # This creates a Regexp which will match 3 "foo"s. # re = Regexp::English.literal("foo" * 3) # re.match("foofoofoo")[0] # => "foofoofoo" # But has any one considered YAML? I find myself using YAML style in my comments sometimes (I use YAML lots) then have to go back and adjust for RDoc. # - !example | # # This creates a Regexp which will match 3 "foo"s. # re = Regexp::English.literal("foo" * 3) # re.match("foofoofoo")[0] # => "foofoofoo" But perhaps too restrictive. T.