Class: Kaminari::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/kaminari/config.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfig

Returns a new instance of Config.



22
23
24
25
26
27
28
29
30
31
32
33
# File 'lib/kaminari/config.rb', line 22

def initialize
  @default_per_page = 25
  @max_per_page = nil
  @window = 4
  @outer_window = 0
  @left = 0
  @right = 0
  @page_method_name = :page
  @param_name = :page
  @max_pages = nil
  @params_on_first_page = false
end

Instance Attribute Details

#default_per_pageObject

Returns the value of attribute default_per_page.



19
20
21
# File 'lib/kaminari/config.rb', line 19

def default_per_page
  @default_per_page
end

#leftObject

Returns the value of attribute left.



19
20
21
# File 'lib/kaminari/config.rb', line 19

def left
  @left
end

#max_pagesObject

Returns the value of attribute max_pages.



19
20
21
# File 'lib/kaminari/config.rb', line 19

def max_pages
  @max_pages
end

#max_per_pageObject

Returns the value of attribute max_per_page.



19
20
21
# File 'lib/kaminari/config.rb', line 19

def max_per_page
  @max_per_page
end

#outer_windowObject

Returns the value of attribute outer_window.



19
20
21
# File 'lib/kaminari/config.rb', line 19

def outer_window
  @outer_window
end

#page_method_nameObject

Returns the value of attribute page_method_name.



19
20
21
# File 'lib/kaminari/config.rb', line 19

def page_method_name
  @page_method_name
end

#param_nameObject

If param_name was given as a callable object, call it when returning



36
37
38
# File 'lib/kaminari/config.rb', line 36

def param_name
  @param_name.respond_to?(:call) ? @param_name.call : @param_name
end

#params_on_first_pageObject

Returns the value of attribute params_on_first_page.



19
20
21
# File 'lib/kaminari/config.rb', line 19

def params_on_first_page
  @params_on_first_page
end

#rightObject

Returns the value of attribute right.



19
20
21
# File 'lib/kaminari/config.rb', line 19

def right
  @right
end

#windowObject

Returns the value of attribute window.



19
20
21
# File 'lib/kaminari/config.rb', line 19

def window
  @window
end