Class: Jekyll::Converters::OrderedList

Inherits:
ToHTML
  • Object
show all
Defined in:
lib/jekyll/converters/cooklang.rb

Instance Method Summary collapse

Methods inherited from ToHTML

#to_list_item

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_htmlObject



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