Skip to content

Instantly share code, notes, and snippets.

@matstc
Last active August 29, 2015 14:07
Show Gist options
  • Save matstc/3b3a324600016d3c5264 to your computer and use it in GitHub Desktop.
Save matstc/3b3a324600016d3c5264 to your computer and use it in GitHub Desktop.
Example of inline if
def previous
@trackIndex -= 1
@trackIndex = 0 if @trackIndex < 0
@play()
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment