Class: Gitlab::Headers::Total
- Inherits:
-
Object
- Object
- Gitlab::Headers::Total
- Defined in:
- lib/gitlab/headers/total.rb
Overview
Parses total header.
Constant Summary collapse
- HEADER_TOTAL =
'x-total'
- TOTAL_REGEX =
/^\d+$/
Instance Attribute Summary collapse
-
#total ⇒ Object
Returns the value of attribute total.
Instance Method Summary collapse
-
#initialize(headers) ⇒ Total
constructor
A new instance of Total.
Constructor Details
#initialize(headers) ⇒ Total
Returns a new instance of Total.
14 15 16 17 18 |
# File 'lib/gitlab/headers/total.rb', line 14 def initialize(headers) header_total = headers[HEADER_TOTAL] extract_total(header_total) if header_total end |
Instance Attribute Details
#total ⇒ Object
Returns the value of attribute total.
12 13 14 |
# File 'lib/gitlab/headers/total.rb', line 12 def total @total end |