Module: BootstrapPagination::BootstrapRenderer
Overview
Contains functionality shared by all renderer classes.
Constant Summary collapse
- ELLIPSIS =
"…"
Instance Method Summary collapse
Instance Method Details
#to_html ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/bootstrap_pagination/bootstrap_renderer.rb', line 8 def to_html list_items = pagination.map do |item| case item when Fixnum page_number(item) else send(item) end end.join(@options[:link_separator]) if @options[:bootstrap].to_i >= 3 tag("ul", list_items, class: "pagination") else html_container(tag("ul", list_items)) end end |