Class: RubyUI::DataTablePagyAdapter
- Inherits:
-
Object
- Object
- RubyUI::DataTablePagyAdapter
- Defined in:
- lib/ruby_ui/data_table/data_table_pagy_adapter.rb
Instance Method Summary collapse
- #current_page ⇒ Object
-
#initialize(pagy) ⇒ DataTablePagyAdapter
constructor
A new instance of DataTablePagyAdapter.
- #per_page ⇒ Object
- #total_count ⇒ Object
- #total_pages ⇒ Object
Constructor Details
#initialize(pagy) ⇒ DataTablePagyAdapter
Returns a new instance of DataTablePagyAdapter.
5 6 7 |
# File 'lib/ruby_ui/data_table/data_table_pagy_adapter.rb', line 5 def initialize(pagy) @pagy = pagy end |
Instance Method Details
#current_page ⇒ Object
9 |
# File 'lib/ruby_ui/data_table/data_table_pagy_adapter.rb', line 9 def current_page = @pagy.page |
#per_page ⇒ Object
15 |
# File 'lib/ruby_ui/data_table/data_table_pagy_adapter.rb', line 15 def per_page = @pagy.items |
#total_count ⇒ Object
13 |
# File 'lib/ruby_ui/data_table/data_table_pagy_adapter.rb', line 13 def total_count = @pagy.count |
#total_pages ⇒ Object
11 |
# File 'lib/ruby_ui/data_table/data_table_pagy_adapter.rb', line 11 def total_pages = @pagy.pages |