Class: Veye::Pagination::Show
- Inherits:
-
Object
- Object
- Veye::Pagination::Show
- Extended by:
- FormatHelpers
- Defined in:
- lib/veye/pagination/show.rb
Constant Summary collapse
- @@pagination_formats =
{ 'csv' => PaginationCSV.new, 'json' => PaginationJSON.new, 'pretty' => PaginationPretty.new, 'table' => PaginationTable.new }
Class Method Summary collapse
Methods included from FormatHelpers
format_exists?, formats_attached?, supported_format?
Class Method Details
.format(paging, format = 'pretty') ⇒ Object
18 19 20 21 22 23 24 25 |
# File 'lib/veye/pagination/show.rb', line 18 def self.format(paging, format = 'pretty') self.supported_format?(@@pagination_formats, format) formatter = @@pagination_formats[format] formatter.before formatter.format paging formatter.after end |