Last active
November 8, 2019 12:19
-
-
Save borischerkasky/ecd6eb26c3d395fc3c06d979617ec0c7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def get_next_page(res) | |
res.headers['link']&. | |
split(',')&. | |
select{|x| x.include? 'next'}&.first&.split(';')&. | |
first&. | |
gsub(/[ ><]/,'') | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment