Class: Docgenerator::Creole::Rubycode::Code_output

Inherits:
Placeholder show all
Defined in:
lib/creole/plugins/rubycode4creole.rb

Overview

Take only the output of the rubycode

Instance Method Summary collapse

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



83
84
85
86
87
88
89
# File 'lib/creole/plugins/rubycode4creole.rb', line 83

def to_doc( target, options = {})
  codetest = Docgenerator::Rubycode::CodeTest.new(nil, @source.join )
  #~ element(:verbatim,{},@source ).cr.to_doc( target, options )

  element(:verbatim, {
      :style => 'rubycode_output',
    }, codetest.output ).cr.to_doc( target, options )
end