From: GOTO Kentaro Date: 2002-01-27T07:56:05+09:00 Subject: Re: RDoc: eval("class A; ... end") In message "Re: RDoc: eval("class A; ... end")" on Sun, 27 Jan 2002 00:05:47 +0900, Dave Thomas writes: > #:rdoc-eval:start .... > eval %- > RC_#{var_name} = #{code} > #> # Error message: #{StatusMessage[code] > #> class #{err_name} < #{parent} > #> ends > class #{err_name} < #{parent} .... > #rdoc-eval:end > > > The lines with '#>' are like a kind of 'puts' - they inject the rest > of the line back in to the source. In this example, the first line is > the comment used to document the class, and the next two define it. It looks nice. I'm guessing that its binding would be established by a region from #:rdoc-eval:begin to #:rdoc-eval:end. Is this right? Are these bindings shared by more than two chunks of :rdoc-eval:? > Would something like this work for people? Something to refer to other files for foreign symbols may be helpful. Or, I should use `require' in :rdoc-eval: simply, maybe. -- Gotoken