Class: GearedPagination::Headers

Inherits:
Object
  • Object
show all
Defined in:
lib/geared_pagination/headers.rb

Instance Method Summary collapse

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

#applyObject



9
10
11
# File 'lib/geared_pagination/headers.rb', line 9

def apply
  @controller.headers.update(headers) if applicable?
end