Method: Pod::Specification::DSL::RootAttributesAccessors#license

Defined in:
lib/cocoapods-core/specification/root_attribute_accessors.rb

#licenseHash

Note:

The indentation is stripped from the license text.

Returns A hash containing the license information of the Pod.

Returns:

  • (Hash)

    A hash containing the license information of the Pod.



118
119
120
121
122
123
124
125
126
127
128
129
# File 'lib/cocoapods-core/specification/root_attribute_accessors.rb', line 118

def license
  license = attributes_hash['license']
  if license.is_a?(String)
    { :type => license }
  elsif license.is_a?(Hash)
    license = Specification.convert_keys_to_symbol(license)
    license[:text] = license[:text].strip_heredoc if license[:text]
    license
  else
    {}
  end
end