Class: GearedPagination::Headers
- Inherits:
-
Object
- Object
- GearedPagination::Headers
- Defined in:
- lib/geared_pagination/headers.rb
Instance Method Summary collapse
- #apply ⇒ Object
-
#initialize(page:, controller:) ⇒ Headers
constructor
A new instance of Headers.
Constructor Details
#initialize(page:, controller:) ⇒ Headers
Returns a new instance of Headers.
5 6 7 |
# File 'lib/geared_pagination/headers.rb', line 5 def initialize(page:, controller:) @page, @controller = page, controller end |
Instance Method Details
#apply ⇒ Object
9 10 11 |
# File 'lib/geared_pagination/headers.rb', line 9 def apply @controller.headers.update(headers) if applicable? end |