Created
March 22, 2011 12:22
-
-
Save aurelian/881130 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tag += (sequence == 0)? '.1' : ((sequence < 0)? '' : ("."+(sequence+1).to_s) |
tmacedo
commented
Mar 22, 2011
I think encapsulating it into some VersionCounter would be the best ... but
tag += (sequence == 0) ? '1' : next_version(sequence)
def next_version(sequence)
if sequence > 0
("."+(sequence+1).to_s)
else
''
end
end
tiago won
tag += (sequence >= 0)? "."+(sequence+1).to_s : ''
this: tag += (sequence >= 0)? "."+(sequence+1).to_s : ''
is winning
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment