Class: Gitlab::Pagination::Keyset::HeaderBuilder
- Inherits:
-
Object
- Object
- Gitlab::Pagination::Keyset::HeaderBuilder
- Defined in:
- lib/gitlab/pagination/keyset/header_builder.rb
Instance Attribute Summary collapse
-
#request_context ⇒ Object
readonly
Returns the value of attribute request_context.
Instance Method Summary collapse
- #add_next_page_header(query_params) ⇒ Object
-
#initialize(request_context) ⇒ HeaderBuilder
constructor
A new instance of HeaderBuilder.
Constructor Details
#initialize(request_context) ⇒ HeaderBuilder
Returns a new instance of HeaderBuilder.
11 12 13 |
# File 'lib/gitlab/pagination/keyset/header_builder.rb', line 11 def initialize(request_context) @request_context = request_context end |
Instance Attribute Details
#request_context ⇒ Object (readonly)
Returns the value of attribute request_context.
7 8 9 |
# File 'lib/gitlab/pagination/keyset/header_builder.rb', line 7 def request_context @request_context end |
Instance Method Details
#add_next_page_header(query_params) ⇒ Object
15 16 17 18 |
# File 'lib/gitlab/pagination/keyset/header_builder.rb', line 15 def add_next_page_header(query_params) link = next_page_link(page_href(query_params)) header('Link', link) end |