Class: Kaminari::Config
- Inherits:
-
Object
- Object
- Kaminari::Config
- Defined in:
- lib/kaminari/config.rb
Instance Attribute Summary collapse
-
#default_per_page ⇒ Object
Returns the value of attribute default_per_page.
-
#left ⇒ Object
Returns the value of attribute left.
-
#max_pages ⇒ Object
Returns the value of attribute max_pages.
-
#max_per_page ⇒ Object
Returns the value of attribute max_per_page.
-
#outer_window ⇒ Object
Returns the value of attribute outer_window.
-
#page_method_name ⇒ Object
Returns the value of attribute page_method_name.
-
#param_name ⇒ Object
If param_name was given as a callable object, call it when returning.
-
#params_on_first_page ⇒ Object
Returns the value of attribute params_on_first_page.
-
#right ⇒ Object
Returns the value of attribute right.
-
#window ⇒ Object
Returns the value of attribute window.
Instance Method Summary collapse
-
#initialize ⇒ Config
constructor
A new instance of Config.
Constructor Details
#initialize ⇒ Config
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_page ⇒ Object
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 |
#left ⇒ Object
Returns the value of attribute left.
19 20 21 |
# File 'lib/kaminari/config.rb', line 19 def left @left end |
#max_pages ⇒ Object
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_page ⇒ Object
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_window ⇒ Object
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_name ⇒ Object
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_name ⇒ Object
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_page ⇒ Object
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 |
#right ⇒ Object
Returns the value of attribute right.
19 20 21 |
# File 'lib/kaminari/config.rb', line 19 def right @right end |
#window ⇒ Object
Returns the value of attribute window.
19 20 21 |
# File 'lib/kaminari/config.rb', line 19 def window @window end |