lib/cocoapods-core/podfile/target_definition.rb
# The path of the podspec with the given options.
#
# @param  [Hash] options
#         The options to use for finding the podspec. The supported keys
#         are: `:name`, `:path`, `:autodetect`.
#
# @return [Pathname] The path.
#
The path of the podspec with the given options.
The path of the podspec with the given options .
def podspec_path_from_options(options)
        if path = options[:path]
          path_with_ext = File.extname(path) == '.podspec' ? path : "#{path}.podspec"
          path_without_tilde = path_with_ext.gsub('~', ENV['HOME'])
          file = podfile.defined_in_file.dirname + path_without_tilde
        elsif name = options[:name]
          name = File.extname(name) == '.podspec' ? name : "#{name}.podspec"
          file = podfile.defined_in_file.dirname + name
        elsif options[:autodetect]
          file = Pathname.glob(podfile.defined_in_file.dirname + '*.podspec').first
        end
      end
def podspec_path_from_options ( options ) if path = options [ :path ] path_with_ext = File . extname ( path ) == '.podspec' ? path : "#{path}.podspec" path_without_tilde = path_with_ext . gsub ( '~' , ENV [ 'HOME' ] ) file = podfile . defined_in_file . dirname + path_without_tilde elsif name = options [ :name ] name = File . extname ( name ) == '.podspec' ? name : "#{name}.podspec" file = podfile . defined_in_file . dirname + name elsif options [ :autodetect ] file = Pathname . glob ( podfile . defined_in_file . dirname + '*.podspec' ) . first end end
The path of the podspec with the given options.
The path of the podspec with the given options .
None
Pathname
options
options The options to use for finding the podspec. The supported keys are: `:name`, `:path`, `:autodetect`.
options The options to use for finding the podspec . The supported keys are : ` : name ` ` : path ` ` : autodetect ` .