lib/multi_json/version.rb in multi_json-1.7.4 vs lib/multi_json/version.rb in multi_json-1.7.5

- old
+ new

@@ -1,3 +1,18 @@ module MultiJson - VERSION = '1.7.4' unless defined?(MultiJson::VERSION) + class Version + MAJOR = 1 unless defined? MultiJson::Version::MAJOR + MINOR = 7 unless defined? MultiJson::Version::MINOR + PATCH = 5 unless defined? MultiJson::Version::PATCH + PRE = nil unless defined? MultiJson::Version::PRE + + class << self + + # @return [String] + def to_s + [MAJOR, MINOR, PATCH, PRE].compact.join('.') + end + + end + + end end