Class: Jekyll::Converters::UnorderedList

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) ⇒ UnorderedList

Returns a new instance of UnorderedList.



73
74
75
# File 'lib/jekyll/converters/cooklang.rb', line 73

def initialize(items)
  @items = items
end

Instance Method Details

#to_htmlObject



77
78
79
80
81
82
# File 'lib/jekyll/converters/cooklang.rb', line 77

def to_html
  list_items = @items.map do |item|
    item.to_list_item
  end
  "<ul>" + list_items.join + "</ul>"
end