Class: Paginate::Configuration
- Inherits:
-
Object
- Object
- Paginate::Configuration
- Defined in:
- lib/paginate/configuration.rb
Instance Attribute Summary collapse
-
#param_name ⇒ Object
Returns the value of attribute param_name.
-
#renderer ⇒ Object
Returns the value of attribute renderer.
-
#size ⇒ Object
Returns the value of attribute size.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
- #to_hash ⇒ Object
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
7 8 9 10 11 |
# File 'lib/paginate/configuration.rb', line 7 def initialize @param_name = :page @size = 10 @renderer = Renderer::List end |
Instance Attribute Details
#param_name ⇒ Object
Returns the value of attribute param_name.
4 5 6 |
# File 'lib/paginate/configuration.rb', line 4 def param_name @param_name end |
#renderer ⇒ Object
Returns the value of attribute renderer.
5 6 7 |
# File 'lib/paginate/configuration.rb', line 5 def renderer @renderer end |
#size ⇒ Object
Returns the value of attribute size.
3 4 5 |
# File 'lib/paginate/configuration.rb', line 3 def size @size end |
Instance Method Details
#to_hash ⇒ Object
13 14 15 16 17 18 19 |
# File 'lib/paginate/configuration.rb', line 13 def to_hash { size: size, param_name: param_name, renderer: renderer } end |