Class: Minidown::OrderListElement
- Inherits:
-
ListGroupElement
- Object
- Element
- ListGroupElement
- Minidown::OrderListElement
- Defined in:
- lib/minidown/elements/order_list_element.rb
Constant Summary collapse
Constants inherited from ListGroupElement
ListGroupElement::IndentRegexp, ListGroupElement::StartWithBlankRegexp
Instance Attribute Summary
Attributes inherited from ListGroupElement
Attributes inherited from Element
#children, #content, #doc, #nodes
Instance Method Summary collapse
-
#initialize(doc, line, indent_level = 0) ⇒ OrderListElement
constructor
A new instance of OrderListElement.
- #to_html ⇒ Object
Methods inherited from ListGroupElement
Methods inherited from Element
#blank?, #parse, #raw_content, #raw_content=, #unparsed_lines
Methods included from HtmlHelper
Constructor Details
#initialize(doc, line, indent_level = 0) ⇒ OrderListElement
Returns a new instance of OrderListElement.
6 7 8 9 10 11 12 |
# File 'lib/minidown/elements/order_list_element.rb', line 6 def initialize doc, line, indent_level = 0 super doc, line @children << ListElement.new(doc, content) @lists = @children.dup @indent_level = indent_level @put_back = [] end |
Instance Method Details
#to_html ⇒ Object
14 15 16 17 18 |
# File 'lib/minidown/elements/order_list_element.rb', line 14 def to_html build_tag 'ol'.freeze do |content| children.each { |child| content << child.to_html} end end |