Class: Docgenerator::Creole::Rubycode::Code_evaluated_listings
- Inherits:
-
Placeholder
- Object
- Placeholder
- Docgenerator::Creole::Rubycode::Code_evaluated_listings
- Defined in:
- lib/creole/plugins/rubycode4creole.rb
Overview
Print ruby source code and put the result of each line as a comment.
Same as Code_evaluated, but export is done for in TeX-Package listings.
Instance Method Summary collapse
-
#to_doc(target, options = {}) ⇒ Object
Return content in a verbatim environment.
Methods inherited from Placeholder
#<<, #close, #initialize, set_placeholder_key
Constructor Details
This class inherits a constructor from Docgenerator::Creole::Placeholder
Instance Method Details
#to_doc(target, options = {}) ⇒ Object
Return content in a verbatim environment
67 68 69 70 71 72 73 74 |
# File 'lib/creole/plugins/rubycode4creole.rb', line 67 def to_doc( target, = {}) codetest = Docgenerator::Rubycode::CodeTest.new(nil, @source.join ) #~ element(:verbatim, { #~ :style => 'rubycode_evaluated', #~ }, codetest.code_evaluation ).cr.to_doc( target, options ) codetest.code_evaluation_lstlisting.to_doc( target, ) end |