# File lib/dep_selector/version_constraint.rb, line 31 def initialize(constraint_spec=nil) constraint_spec ||= DEFAULT_CONSTRAINT case constraint_spec when nil parse(DEFAULT_CONSTRAINT) when Array parse_from_array(constraint_spec) when String parse(constraint_spec) else msg = "VersionConstraint should be created from a String. You gave: #{constraint_spec.inspect}" raise Exceptions::InvalidVersionConstraint, msg end end
# File lib/dep_selector/version_constraint.rb, line 63 def eql?(o) o.class == self.class && @op == o.op && @version == o.version end
# File lib/dep_selector/version_constraint.rb, line 46 def include?(v) version = if v.respond_to? :version Version.new(v.version.to_s) else Version.new(v.to_s) end do_op(version) end
Generated with the Darkfish Rdoc Generator 2.