Created
October 24, 2019 17:19
-
-
Save breim/50a0e7d0264546ceba87a85a45091dd8 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
# frozen_string_literal: true | |
module InstagramProviderHelper | |
def network | |
send(self.provider) | |
end | |
def last_photo | |
network.dig(:medias).last.dig(:media_url) | |
end | |
def medias | |
network.dig('medias') | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment