lib/version_info.rb in version_info-1.0.0 vs lib/version_info.rb in version_info-1.1.0
- old
+ new
@@ -1,15 +1,19 @@
require 'version_info/data'
module VersionInfo
+ # current segments or defaults
def self.segments
- [:major, :minor, :patch]
+ @segments ||= [:major, :minor, :patch]
end
+
+ # define segments
+ def self.segments=(values)
+ @segments = values
+ end
def self.included(other)
- # data = Class.new(Data)
- # other.const_set('Version', data)
other.const_set('VERSION', Data.new)
end
autoload :RakeTasks, 'version_info/rake_tasks'
autoload :ThorTasks, 'version_info/thor_tasks'