Method: Pod::Source#to_hash

Defined in:
lib/cocoapods-core/source.rb

#to_hashHash{String=>{String=>Specification}}

Returns the static representation of all the specifications grouped first by name and then by version.

Returns:

  • (Hash{String=>{String=>Specification}})

    the static representation of all the specifications grouped first by name and then by version.

[View source]

400
401
402
403
404
405
406
407
# File 'lib/cocoapods-core/source.rb', line 400

def to_hash
  hash = {}
  all_specs.each do |spec|
    hash[spec.name] ||= {}
    hash[spec.name][spec.version.version] = spec.to_hash
  end
  hash
end