gem_version.rb 318 Bytes
Newer Older
Ondrej Sury's avatar
Ondrej Sury committed
1 2 3 4 5 6 7 8 9
module ActiveRecord
  # Returns the version of the currently loaded ActiveRecord as a <tt>Gem::Version</tt>
  def self.gem_version
    Gem::Version.new VERSION::STRING
  end

  module VERSION
    MAJOR = 4
    MINOR = 1
10
    TINY  = 5
Ondrej Sury's avatar
Ondrej Sury committed
11 12 13 14 15
    PRE   = nil

    STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".")
  end
end