Class: RDoc::Markup::ToTest
Relationships & Source Files | |
Super Chains via Extension / Inclusion / Inheritance | |
Class Chain:
self,
Formatter
|
|
Instance Chain:
self,
Formatter
|
|
Inherits: |
RDoc::Markup::Formatter
|
Defined in: | lib/rdoc/markup/to_test.rb |
Overview
This Markup outputter is used for testing purposes.
Visitor
Class Method Summary
Formatter
- Inherited
.gen_relative_url | Converts a target url to one that is relative to a given path. |
.new | Creates a new |
Instance Attribute Summary
Instance Method Summary
Formatter
- Inherited
#accept_document | Adds |
#add_regexp_handling_RDOCLINK | Adds a regexp handling for links of the form rdoc-…: |
#add_regexp_handling_TIDYLINK | Adds a regexp handling for links of the form |
#add_tag | Add a new set of tags for an attribute. |
#annotate | Allows |
#convert | Marks up |
#convert_flow | Converts flow items |
#convert_regexp_handling | Converts added regexp handlings. |
#convert_string | Converts a string to be fancier if desired. |
#ignore | Use ignore in your subclass to ignore the content of a node. |
#off_tags | Turns off tags for |
#on_tags | Turns on tags for |
#parse_url | Extracts and a scheme, url and an anchor id from |
#tt? | Is |
Constructor Details
This class inherits a constructor from RDoc::Markup::Formatter
Instance Method Details
#accept_blank_line(blank_line)
[ GitHub ]# File 'lib/rdoc/markup/to_test.rb', line 55
def accept_blank_line(blank_line) @res << "\n" end
#accept_heading(heading)
[ GitHub ]# File 'lib/rdoc/markup/to_test.rb', line 59
def accept_heading(heading) @res << "#{'=' * heading.level} #{heading.text}" end
#accept_list_end(list)
[ GitHub ]# File 'lib/rdoc/markup/to_test.rb', line 44
def accept_list_end(list) @list.pop end
#accept_list_item_end(list_item)
[ GitHub ]# File 'lib/rdoc/markup/to_test.rb', line 52
def accept_list_item_end(list_item) end
#accept_list_item_start(list_item)
[ GitHub ]# File 'lib/rdoc/markup/to_test.rb', line 48
def accept_list_item_start(list_item) @res << "#{' ' * (@list.size - 1)}#{@list.last}: " end
#accept_list_start(list)
[ GitHub ]# File 'lib/rdoc/markup/to_test.rb', line 33
def accept_list_start(list) @list << case list.type when :BULLET then '*' when :NUMBER then '1' else list.type end end
#accept_paragraph(paragraph)
[ GitHub ]# File 'lib/rdoc/markup/to_test.rb', line 21
def accept_paragraph(paragraph) @res << convert_flow(@am.flow(paragraph.text)) end
#accept_raw(raw)
[ GitHub ]# File 'lib/rdoc/markup/to_test.rb', line 25
def accept_raw raw @res << raw.parts.join end
#accept_rule(rule)
[ GitHub ]# File 'lib/rdoc/markup/to_test.rb', line 63
def accept_rule(rule) @res << '-' * rule.weight end
#accept_verbatim(verbatim)
[ GitHub ]# File 'lib/rdoc/markup/to_test.rb', line 29
def accept_verbatim(verbatim) @res << verbatim.text.gsub(/^(\S)/, ' \1') end
#end_accepting
[ GitHub ]# File 'lib/rdoc/markup/to_test.rb', line 17
def end_accepting @res end
#start_accepting
[ GitHub ]# File 'lib/rdoc/markup/to_test.rb', line 12
def start_accepting @res = [] @list = [] end