| Class | SM::ToFlow |
| In: |
rdoc/markup/simple_markup/to_flow.rb
|
| Parent: | Object |
| LIST_TYPE_TO_HTML | = | { SM::ListBase::BULLET => [ "<ul>", "</ul>" ], SM::ListBase::NUMBER => [ "<ol>", "</ol>" ], SM::ListBase::UPPERALPHA => [ "<ol>", "</ol>" ], SM::ListBase::LOWERALPHA => [ "<ol>", "</ol>" ], SM::ListBase::LABELED => [ "<dl>", "</dl>" ], SM::ListBase::NOTE => [ "<table>", "</table>" ], } |
| InlineTag | = | Struct.new(:bit, :on, :off) |
# File rdoc/markup/simple_markup/to_flow.rb, line 111 def accept_blank_line(am, fragment) # @res << annotate("<p />") << "\n" end
# File rdoc/markup/simple_markup/to_flow.rb, line 115 def accept_heading(am, fragment) @res << Flow::H.new(fragment.head_level, convert_flow(am.flow(fragment.txt))) end
# File rdoc/markup/simple_markup/to_flow.rb, line 103 def accept_list_end(am, fragment) @res = @list_stack.pop end
# File rdoc/markup/simple_markup/to_flow.rb, line 107 def accept_list_item(am, fragment) @res << Flow::LI.new(fragment.param, convert_flow(am.flow(fragment.txt))) end
# File rdoc/markup/simple_markup/to_flow.rb, line 96 def accept_list_start(am, fragment) @list_stack.push(@res) list = Flow::LIST.new(fragment.type) @res << list @res = list end
# File rdoc/markup/simple_markup/to_flow.rb, line 82 def accept_paragraph(am, fragment) @res << Flow::P.new((convert_flow(am.flow(fragment.txt)))) end
# File rdoc/markup/simple_markup/to_flow.rb, line 90 def accept_rule(am, fragment) size = fragment.param size = 10 if size > 10 @res << Flow::RULE.new(size) end
# File rdoc/markup/simple_markup/to_flow.rb, line 86 def accept_verbatim(am, fragment) @res << Flow::VERB.new((convert_flow(am.flow(fragment.txt)))) end
Given an HTML tag, decorate it with class information and the like if required. This is a no-op in the base class, but is overridden in HTML output classes that implement style sheets
# File rdoc/markup/simple_markup/to_flow.rb, line 66 def annotate(tag) tag end
Set up the standard mapping of attributes to HTML tags
# File rdoc/markup/simple_markup/to_flow.rb, line 44 def init_tags @attr_tags = [ InlineTag.new(SM::Attribute.bitmap_for(:BOLD), "<b>", "</b>"), InlineTag.new(SM::Attribute.bitmap_for(:TT), "<tt>", "</tt>"), InlineTag.new(SM::Attribute.bitmap_for(:EM), "<em>", "</em>"), ] end
ruby-doc.org is a community service provided by Happy Camper Studios, a Phoenix, Arizona, Ruby application development company.
Documentation content on ruby-doc.org is provided by remarkable members of the Ruby community.
For more information on the Ruby programming language, visit ruby-lang.org.
Want to help improve Ruby's API docs? See Ruby Documentation Guidelines.