Module: ErrorTracking::SentryClient::PaginationParser
- Defined in:
- lib/error_tracking/sentry_client/pagination_parser.rb
Constant Summary collapse
- PATTERN =
/rel="(?<direction>\w+)";\sresults="(?<results>\w+)";\scursor="(?<cursor>.+)"/
Class Method Summary collapse
Class Method Details
.parse(headers) ⇒ Object
8 9 10 11 12 |
# File 'lib/error_tracking/sentry_client/pagination_parser.rb', line 8 def self.parse(headers) links = headers['link'].to_s.split(',') links.map { |link| parse_link(link) }.compact.to_h end |