aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/gem_version.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/lib/active_record/gem_version.rb')
-rw-r--r--activerecord/lib/active_record/gem_version.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/gem_version.rb b/activerecord/lib/active_record/gem_version.rb
new file mode 100644
index 0000000000..4a7aace460
--- /dev/null
+++ b/activerecord/lib/active_record/gem_version.rb
@@ -0,0 +1,15 @@
+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 = 2
+ TINY = 0
+ PRE = "alpha"
+
+ STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".")
+ end
+end