Commit ab81fb39 authored by Samuel E. Giddins's avatar Samuel E. Giddins

[Resolver] Return lazy specifications in Set#all_specifications

parent 3c3ae3c3
...@@ -16,10 +16,27 @@ end ...@@ -16,10 +16,27 @@ end
module Pod module Pod
class Specification::Set class Specification::Set
# TODO needs to yield a lazy enumerator of lazy proxies class LazySpecification
attr_reader :name, :version, :source
def initialize(name, version, source)
@name = name
@version = version
@source = source
end
def method_missing(method, *args, &block)
specification.send(method, *args, &block)
end
def specification
@specification ||= source.specification(name, version)
end
end
def all_specifications def all_specifications
@all_specifications ||= versions_by_source.map do |source, versions| @all_specifications ||= versions_by_source.map do |source, versions|
versions.map { |version| source.specification(name, version) } versions.map { |version| LazySpecification.new(name, version, source) }
end.flatten end.flatten
end end
end end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment