Class: RubyUI::DataTablePagyAdapter

Inherits:
Object
  • Object
show all
Defined in:
lib/generators/ruby_cms/templates/components/ruby_ui/data_table/data_table_pagy_adapter.rb

Instance Method Summary collapse

Constructor Details

#initialize(pagy) ⇒ DataTablePagyAdapter

Returns a new instance of DataTablePagyAdapter.



5
6
7
# File 'lib/generators/ruby_cms/templates/components/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/generators/ruby_cms/templates/components/ruby_ui/data_table/data_table_pagy_adapter.rb', line 9

def current_page = @pagy.page

#per_page ⇒ Object



15
# File 'lib/generators/ruby_cms/templates/components/ruby_ui/data_table/data_table_pagy_adapter.rb', line 15

def per_page = @pagy.limit

#total_count ⇒ Object



13
# File 'lib/generators/ruby_cms/templates/components/ruby_ui/data_table/data_table_pagy_adapter.rb', line 13

def total_count = @pagy.count

#total_pages ⇒ Object



11
# File 'lib/generators/ruby_cms/templates/components/ruby_ui/data_table/data_table_pagy_adapter.rb', line 11

def total_pages = @pagy.pages