Extracts sections of text enclosed in plus, tt or code. Used to discover undocumented parameters.
Methods
- A
- D
- E
- N
- S
- T
Attributes
[R] | list_type | Stack of list types |
[R] | res | Output accumulator |
Class Public methods
new(markup = nil)
Link
Creates a new tt-only formatter.
Instance Public methods
accept_list_item_start(list_item)
Link
Prepares the visitor for consuming list_item
accept_paragraph(paragraph)
Link
Adds paragraph
to the output
do_nothing(markup_item)
Link
Does nothing to markup_item
because it doesn't have any
user-built content
Also aliased as: accept_blank_line, accept_heading, accept_list_item_end, accept_raw, accept_rule, accept_verbatim
end_accepting()
Link
Returns an Array of items that were wrapped in plus, tt or code.
start_accepting()
Link
Prepares the visitor for gathering tt sections
tt_sections(text)
Link
Extracts tt sections from text
# File ../ruby/lib/rdoc/markup/to_tt_only.rb, line 77 def tt_sections text flow = @am.flow text.dup flow.each do |item| case item when String then @res << item if in_tt? when RDoc::Markup::AttrChanger then off_tags res, item on_tags res, item when RDoc::Markup::Special then @res << convert_special(item) if in_tt? # TODO can this happen? else raise "Unknown flow element: #{item.inspect}" end end res end