Method: Bookify::Node::List#render

Defined in:
lib/bookify/node/list.rb

#renderObject



5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# File 'lib/bookify/node/list.rb', line 5

def render
  font :primary

  move_up PADDING

  data = node.css("li").each_with_index.map do |li, i|
    [bullet(i), li.inner_html.strip]
  end

  table(data) do
    cells.inline_format = true
    cells.borders = []
    cells.padding = PADDING
  end

  move_down (10 - PADDING)
end