Rubocop: Style/NestedTernaryOperator

- Ternary operators must not be nested. Prefer if/else constructs instead.
This commit is contained in:
Pat Hawks 2016-01-04 11:46:25 -08:00
parent 78e9f3389e
commit 085a778b0a
No known key found for this signature in database
GPG Key ID: F1746FF5F18B3D1B
1 changed files with 8 additions and 1 deletions

View File

@ -123,7 +123,14 @@ module Jekyll
private
def launch_browser(server, opts)
command = Utils::Platforms.windows?? "start" : Utils::Platforms.osx?? "open" : "xdg-open"
command =
if Utils::Platforms.windows?
"start"
elsif Utils::Platforms.osx?
"open"
else
"xdg-open"
end
system command, server_address(server, opts)
end