Allow depending on requirement class or instance.
This commit is contained in:
parent
ff4baa3fcc
commit
a3daca1b13
@ -54,6 +54,12 @@ private
|
|||||||
Dependency.new(spec.name, tag)
|
Dependency.new(spec.name, tag)
|
||||||
when Dependency, Requirement
|
when Dependency, Requirement
|
||||||
spec
|
spec
|
||||||
|
when Class
|
||||||
|
if spec < Requirement
|
||||||
|
spec.new
|
||||||
|
else
|
||||||
|
raise "#{spec} is not a Requirement subclass"
|
||||||
|
end
|
||||||
else
|
else
|
||||||
raise "Unsupported type #{spec.class} for #{spec}"
|
raise "Unsupported type #{spec.class} for #{spec}"
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user