ruby - Refactoring conditional variable assignment -


I am working on a project. Currently I have a large conditional statement, which provides a value for variables based on some input parameters. So, I have something like that.

  If some condition x = some value alsf another condition x = a different value ...   

What's the best way to refact this ? I hope I can end up with something like this

  x = some value if some condition ||   

Is there a pattern for this type of thing?

Michael Elkan