about summary refs log tree commit diff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/mastodon/version.rb28
1 files changed, 27 insertions, 1 deletions
diff --git a/lib/mastodon/version.rb b/lib/mastodon/version.rb
index 51cf2e5f8..4ea9bab36 100644
--- a/lib/mastodon/version.rb
+++ b/lib/mastodon/version.rb
@@ -1,5 +1,31 @@
 # frozen_string_literal: true
 
 module Mastodon
-  VERSION = '1.2.2'
+  module Version
+    module_function
+
+    def major
+      1
+    end
+
+    def minor
+      3
+    end
+
+    def patch
+      0
+    end
+
+    def pre
+      nil
+    end
+
+    def to_a
+      [major, minor, patch, pre].compact
+    end
+
+    def to_s
+      to_a.join('.')
+    end
+  end
 end