Skip to content

Instantly share code, notes, and snippets.

@jasonkarns
Created October 8, 2012 17:11
Show Gist options
  • Save jasonkarns/3853663 to your computer and use it in GitHub Desktop.
Save jasonkarns/3853663 to your computer and use it in GitHub Desktop.
Improved ::VERSION pattern for gems?
module MyGem
module VERSION
MAJOR=0
MINOR=0
PATCH=1
PRE="beta"
def self.to_s
[MAJOR, MINOR, PATCH, PRE].compact.join(".")
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment