Method: Pod::Podfile::TargetDefinition#store_podspec
- Defined in:
- lib/cocoapods-core/podfile/target_definition.rb
#store_podspec(options = nil) ⇒ void
TODO:
This urgently needs a rename.
Note:
The storage of this information is optimized for YAML readability.
This method returns an undefined value.
Stores the podspec whose dependencies should be included by the target.
741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 |
# File 'lib/cocoapods-core/podfile/target_definition.rb', line 741 def store_podspec( = nil) ||= {} unless .keys.all? { |key| [:name, :path, :subspecs, :subspec].include?(key) } raise StandardError, 'Unrecognized options for the podspec ' \ "method `#{}`" end if subspec_name = [:subspec] unless subspec_name.is_a?(String) raise StandardError, "Option `:subspec => #{subspec_name.inspect}` should be a String" end end if subspec_names = [:subspecs] if !subspec_names.is_a?(Array) || !subspec_names.all? { |name| name.is_a? String } raise StandardError, "Option `:subspecs => #{subspec_names.inspect}` " \ 'should be an Array of Strings' end end [:autodetect] = true if !.include?(:name) && !.include?(:path) get_hash_value('podspecs', []) << end |