I want to do this in ruby:
something() if conditional else something_else()
This doesn’t compile, nor anything similar from what I tried. Is it possible to have statements in this format or do I have to do this as:
if conditional
something()
else
something_else()
end
Unfortunately, I know of no way to have both an if and else without putting the condition first. You can do it in one line, though:
or