VName encapsulates a name-verison pair.
TODO: Need to support version “from-to” spans.
New VName object.
# File lib/pom/require.rb, line 351 def initialize(name) @name, @version = parse(name) end
Converts the version into a constraint recognizable by RubyGems.
# File lib/pom/require.rb, line 356 def constraint case version when /^(.*?)\~$/ "~> #{$1}" when /^(.*?)\+$/ ">= #{$1}" when /^(.*?)\-$/ "< #{$1}" else version end end
Returns a String with name and version.
# File lib/pom/require.rb, line 370 def to_s "#{name} #{version}" end
Generated with the Darkfish Rdoc Generator 2.