summaryrefslogtreecommitdiff
path: root/lib/leap
diff options
context:
space:
mode:
Diffstat (limited to 'lib/leap')
-rw-r--r--lib/leap/platform.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/leap/platform.rb b/lib/leap/platform.rb
index c1103d4..6938fb3 100644
--- a/lib/leap/platform.rb
+++ b/lib/leap/platform.rb
@@ -33,6 +33,8 @@ module Leap
@default_puppet_tags = []
self.instance_eval(&block)
+
+ @version ||= Versionomy.parse("0.0")
end
def version=(version)
@@ -65,6 +67,14 @@ module Leap
@version >= minimum_platform_version && @version <= maximum_platform_version
end
+ def major_version
+ if @version.major == 0
+ "#{@version.major}.#{@version.minor}"
+ else
+ @version.major
+ end
+ end
+
end
end