Allow depending on requirement class or instance.

This commit is contained in:
Mike McQuaid 2013-01-26 14:33:03 +00:00
parent ff4baa3fcc
commit a3daca1b13

View File

@ -54,6 +54,12 @@ private
Dependency.new(spec.name, tag)
when Dependency, Requirement
spec
when Class
if spec < Requirement
spec.new
else
raise "#{spec} is not a Requirement subclass"
end
else
raise "Unsupported type #{spec.class} for #{spec}"
end