Class: Jekyll::Converters::OrderedList
- Defined in:
- lib/jekyll/converters/cooklang.rb
Instance Method Summary collapse
-
#initialize(items) ⇒ OrderedList
constructor
A new instance of OrderedList.
- #to_html ⇒ Object
Methods inherited from ToHTML
Constructor Details
#initialize(items) ⇒ OrderedList
Returns a new instance of OrderedList.
60 61 62 |
# File 'lib/jekyll/converters/cooklang.rb', line 60 def initialize(items) @items = items end |
Instance Method Details
#to_html ⇒ Object
64 65 66 67 68 69 |
# File 'lib/jekyll/converters/cooklang.rb', line 64 def to_html list_items = @items.map do |item| item.to_list_item end "<ol>" + list_items.join + "</ol>" end |