Module: Hemingway::ItemNode

Defined in:
lib/hemingway/block/list/list_nodes.rb

Instance Method Summary collapse

Instance Method Details

#description_htmlObject



27
28
29
30
# File 'lib/hemingway/block/list/list_nodes.rb', line 27

def description_html
  label_tag = label.empty? ? "" : Build.tag("dt", label.html)
  label_tag + Build.tag("dd", sequence.elements.map { |e| e.html }.join)
end

#list_htmlObject



22
23
24
25
# File 'lib/hemingway/block/list/list_nodes.rb', line 22

def list_html
  label_tag = label.empty? ? "" : Build.tag("span", label.html, :class => "list-label")
  Build.tag("li", label_tag + sequence.elements.map { |e| e.html }.join)
end