lib/cocoapods-core/source/aggregate.rb
# Returns a set configured with the source which contains the highest
# version in the aggregate.
#
# @param  [String] name
#         The name of the Pod.
#
# @return [Set] The most representative set for the Pod with the given
#         name. Returns nil if no representative source found containing a pod with given name.
#
Returns a set configured with the source which contains the highest
version in the aggregate.
Returns a set configured with the source which contains the highest version in the aggregate .
def representative_set(name)
        representative_source = nil
        highest_version = nil
        sources.each do |source|
          source_versions = source.versions(name)
          if source_versions
            source_version = source_versions.first
            if highest_version.nil? || (highest_version < source_version)
              highest_version = source_version
              representative_source = source
            end
          end
        end
        representative_source ? Specification::Set.new(name, representative_source) : nil
      end
def representative_set ( name ) representative_source = nil highest_version = nil sources . each do | source | source_versions = source . versions ( name ) if source_versions source_version = source_versions . first if highest_version . nil? || ( highest_version < source_version ) highest_version = source_version representative_source = source end end end representative_source ? Specification :: Set . new ( name , representative_source ) : nil end
Returns a set configured with the source which contains the highest
version in the aggregate.
Returns a set configured with the source which contains the highest version in the aggregate .
The most representative set for the Pod with the given name. Returns nil if no representative source found containing a pod with given name.
The most representative set for the Pod with the given name . Returns nil if no representative source found containing a pod with given name .
Set
name
<not_specific>
<not_specific>
name The name of the Pod.
name The name of the Pod .