class Pod::Installer::ProjectCache::TargetMetadata

Metadata used to reconstruct a PBXTargetDependency.

Attributes

container_project_path[R]

@return [String]

The path of the container project the native target was installed into.
native_target_uuid[R]

@return [String]

The UUID of the native target installed.
target_label[R]

@return [String]

The label of the native target.

Public Class Methods

from_hash(hash) click to toggle source

Constructs a TargetMetadata instance from a hash.

@param [Hash] hash

The hash used to construct a new TargetMetadata instance.

@return [TargetMetadata]

# File lib/cocoapods/installer/project_cache/target_metadata.rb, line 53
def self.from_hash(hash)
  TargetMetadata.new(hash['LABEL'], hash['UUID'], hash['PROJECT_PATH'])
end
from_native_target(sandbox, native_target) click to toggle source

Constructs a TargetMetadata instance from a native target.

@param [Sandbox] sandbox

The sandbox used for this installation.

@param [PBXNativeTarget] native_target

The native target used to construct a TargetMetadata instance.

@return [TargetMetadata]

# File lib/cocoapods/installer/project_cache/target_metadata.rb, line 67
def self.from_native_target(sandbox, native_target)
  TargetMetadata.new(native_target.name, native_target.uuid,
                     native_target.project.path.relative_path_from(sandbox.root).to_s)
end
new(target_label, native_target_uuid, container_project_path) click to toggle source

Initialize a new instance.

@param [String] target_label @see target_label @param [String] native_target_uuid @see native_target_uuid @param [String] container_project_path @see container_project_path

# File lib/cocoapods/installer/project_cache/target_metadata.rb, line 28
def initialize(target_label, native_target_uuid, container_project_path)
  @target_label = target_label
  @native_target_uuid = native_target_uuid
  @container_project_path = container_project_path
end

Public Instance Methods

to_hash() click to toggle source
# File lib/cocoapods/installer/project_cache/target_metadata.rb, line 34
def to_hash
  {
    'LABEL' => target_label,
    'UUID' => native_target_uuid,
    'PROJECT_PATH' => container_project_path,
  }
end
to_s() click to toggle source
# File lib/cocoapods/installer/project_cache/target_metadata.rb, line 42
def to_s
  "#{target_label} : #{native_target_uuid} : #{container_project_path}"
end