Rubocop: Style/NestedTernaryOperator
- Ternary operators must not be nested. Prefer if/else constructs instead.
This commit is contained in:
parent
78e9f3389e
commit
085a778b0a
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue