Class: Avo::PaginatorComponent

Inherits:
ViewComponent::Base
  • Object
show all
Defined in:
app/components/avo/paginator_component.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(resource: nil, parent_model: nil, pagy: nil, turbo_frame: nil, index_params: nil, discreet_pagination: nil) ⇒ PaginatorComponent

Returns a new instance of PaginatorComponent.



11
12
13
14
15
16
17
18
# File 'app/components/avo/paginator_component.rb', line 11

def initialize(resource: nil, parent_model: nil, pagy: nil, turbo_frame: nil, index_params: nil, discreet_pagination: nil)
  @pagy = pagy
  @turbo_frame = turbo_frame
  @index_params = index_params
  @resource = resource
  @parent_model = parent_model
  @discreet_pagination = discreet_pagination
end

Instance Attribute Details

#discreet_paginationObject (readonly)

Returns the value of attribute discreet_pagination.



9
10
11
# File 'app/components/avo/paginator_component.rb', line 9

def discreet_pagination
  @discreet_pagination
end

#index_paramsObject (readonly)

Returns the value of attribute index_params.



6
7
8
# File 'app/components/avo/paginator_component.rb', line 6

def index_params
  @index_params
end

#pagyObject (readonly)

Returns the value of attribute pagy.



4
5
6
# File 'app/components/avo/paginator_component.rb', line 4

def pagy
  @pagy
end

#parent_modelObject (readonly)

Returns the value of attribute parent_model.



8
9
10
# File 'app/components/avo/paginator_component.rb', line 8

def parent_model
  @parent_model
end

#resourceObject (readonly)

Returns the value of attribute resource.



7
8
9
# File 'app/components/avo/paginator_component.rb', line 7

def resource
  @resource
end

#turbo_frameObject (readonly)

Returns the value of attribute turbo_frame.



5
6
7
# File 'app/components/avo/paginator_component.rb', line 5

def turbo_frame
  @turbo_frame
end