7
8
9
10
11
12
13
14
15
16
17
18
|
# File 'lib/bulma_pagination/bulma_renderer.rb', line 7
def to_html
pages =
page_prev = pages.delete(:previous_page)
page_next = pages.delete(:next_page)
list_items = pages.map do |item|
item.is_a?(Integer) ? page_number(item) : send(item)
end.join(@options[:link_separator])
content = tag("ul", list_items, class: "pagination-list")
content.prepend(next_page) if page_next
content.prepend(previous_page) if page_prev
tag("nav", content, class: "pagination #{@options[:class]}")
end
|