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 # Redirect URI
def redirect_uri_for(base_url) def redirect_uri_for(base_url)
return @callback_uri unless URI(@callback_uri).scheme.nil? return @callback_uri unless URI(@callback_uri).scheme.nil?
raise sprintf( if base_url.nil? || URI(base_url).scheme.nil?
MISSING_ABSOLUTE_URL_ERROR, raise sprintf(
@callback_uri MISSING_ABSOLUTE_URL_ERROR,
) if base_url.nil? || URI(base_url).scheme.nil? @callback_uri
)
end
URI.join(base_url, @callback_uri).to_s URI.join(base_url, @callback_uri).to_s
end end
end end