Sha256: 404f02328a7b75b3295ecb59a0488496781fb0404b57f1341c3a56be376953a9

Contents?: true

Size: 832 Bytes

Versions: 9

Compression:

Stored size: 832 Bytes

Contents

require 'rdoc/markup'
require 'rdoc/markup/formatter'

##
# This Markup outputter is used for testing purposes.

class RDoc::Markup::ToTest < RDoc::Markup::Formatter

  ##
  # :section: Visitor

  def start_accepting
    @res = []
  end

  def end_accepting
    @res
  end

  def accept_paragraph(am, fragment)
    @res << fragment.to_s
  end

  def accept_verbatim(am, fragment)
    @res << fragment.to_s
  end

  def accept_list_start(am, fragment)
    @res << fragment.to_s
  end

  def accept_list_end(am, fragment)
    @res << fragment.to_s
  end

  def accept_list_item(am, fragment)
    @res << fragment.to_s
  end

  def accept_blank_line(am, fragment)
    @res << fragment.to_s
  end

  def accept_heading(am, fragment)
    @res << fragment.to_s
  end

  def accept_rule(am, fragment)
    @res << fragment.to_s
  end

end

Version data entries

9 entries across 9 versions & 2 rubygems

Version Path
voloko-sdoc-0.1.3 rdoc/lib/rdoc/markup/to_test.rb
voloko-sdoc-0.1.4 rdoc/lib/rdoc/markup/to_test.rb
voloko-sdoc-0.1.5 rdoc/lib/rdoc/markup/to_test.rb
voloko-sdoc-0.1.6 rdoc/lib/rdoc/markup/to_test.rb
voloko-sdoc-0.1.7 rdoc/lib/rdoc/markup/to_test.rb
rdoc-2.4.3 lib/rdoc/markup/to_test.rb
rdoc-2.4.0 lib/rdoc/markup/to_test.rb
rdoc-2.4.2 lib/rdoc/markup/to_test.rb
rdoc-2.4.1 lib/rdoc/markup/to_test.rb