rubocop autocorrect: Favor a normal if-statement

This commit is contained in:
Kazuhiro Serizawa 2017-02-25 22:55:15 +09:00
parent 37ed189b2e
commit 35bef89588
1 changed files with 6 additions and 4 deletions

View File

@ -267,10 +267,12 @@ module Google
# Redirect URI
def redirect_uri_for(base_url)
return @callback_uri unless URI(@callback_uri).scheme.nil?
if base_url.nil? || URI(base_url).scheme.nil?
raise sprintf(
MISSING_ABSOLUTE_URL_ERROR,
@callback_uri
) if base_url.nil? || URI(base_url).scheme.nil?
)
end
URI.join(base_url, @callback_uri).to_s
end
end