Created
June 12, 2020 09:21
-
-
Save igor-alexandrov/feafc7ba043db55accdf7e39d61870d9 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 process(uri) | |
if uri.scheme == "http" || uri.scheme == "https" | |
fetch_using_http(uri) # returns FastImage::Meta | |
elsif (uri.scheme.nil? || uri.scheme == "file") && !uri.path.nil? | |
fetch_using_file(uri) # returns FastImage::Meta | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment