Skip to content
This repository has been archived by the owner on Sep 12, 2018. It is now read-only.

Commit

Permalink
Simplified OpenPGP::VERSION::STRING construction.
Browse files Browse the repository at this point in the history
  • Loading branch information
artob committed Jul 3, 2010
1 parent b729f7d commit d841fb6
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions lib/openpgp/version.rb
Expand Up @@ -5,10 +5,18 @@ module VERSION
TINY = 2
EXTRA = nil

STRING = [MAJOR, MINOR, TINY].join('.')
STRING << "-#{EXTRA}" if EXTRA
STRING = [MAJOR, MINOR, TINY, EXTRA].compact.join('.')

def self.to_s() STRING end
##
# @return [String]
def self.to_s() STRING end

##
# @return [String]
def self.to_str() STRING end

##
# @return [Array(Integer, Integer, Integer)]
def self.to_a() [MAJOR, MINOR, TINY] end
end
end

0 comments on commit d841fb6

Please sign in to comment.