lib/version_info.rb in version_info-1.8.0 vs lib/version_info.rb in version_info-1.8.2
- old
+ new
@@ -6,9 +6,15 @@
# current segments or defaults
def self.segments
@segments ||= [:major, :minor, :patch]
end
+ def self.segment_at(idx)
+ segments << :build if (segments.size == 3) && (idx>=3)
+ (segments.size..idx).each{|n| segments << "vinfo#{n}".to_sym}
+ @segments[idx]
+ end
+
# define segments
def self.segments=(values)
@segments = values
end