Class: Pod::Hooks::LibraryRepresentation

Inherits:
Object
  • Object
show all
Defined in:
lib/cocoapods/hooks/library_representation.rb

Unsafe Hooks API collapse

Unsafe Hooks API collapse

Private implementation collapse

Instance Method Summary collapse

Constructor Details

#initialize(sandbox, library) ⇒ LibraryRepresentation

Returns a new instance of LibraryRepresentation.

Parameters:

  • sandbox (Sandbox)

    @see sandbox

  • library (Library)

    @see library



83
84
85
86
# File 'lib/cocoapods/hooks/library_representation.rb', line 83

def initialize(sandbox, library)
  @sandbox = sandbox
  @library = library
end

Instance Attribute Details

#libraryLibrary (readonly)

Returns The library whose target needs to be generated.

Returns:

  • (Library)

    The library whose target needs to be generated.



67
68
69
# File 'lib/cocoapods/hooks/library_representation.rb', line 67

def library
  @library
end

#sandboxSandbox (readonly)

Returns sandbox the sandbox where the support files should be generated.

Returns:

  • (Sandbox)

    sandbox the sandbox where the support files should be generated.



63
64
65
# File 'lib/cocoapods/hooks/library_representation.rb', line 63

def sandbox
  @sandbox
end

Instance Method Details

#copy_resources_script_pathPathname

Returns The path of the script used to copy the resources.

Returns:

  • (Pathname)

    The path of the script used to copy the resources.



38
39
40
# File 'lib/cocoapods/hooks/library_representation.rb', line 38

def copy_resources_script_path
  library.copy_resources_script_path
end

#dependenciesArray<Dependency>

Returns The dependencies of this library.

Returns:

  • (Array<Dependency>)

    The dependencies of this library.



17
18
19
# File 'lib/cocoapods/hooks/library_representation.rb', line 17

def dependencies
  target_definition.dependencies
end

#nameString

Returns The name of the Pods library.

Returns:

  • (String)

    The name of the Pods library.



11
12
13
# File 'lib/cocoapods/hooks/library_representation.rb', line 11

def name
  library.name
end

#prefix_header_pathPathname Also known as: prefix_header_filename

Returns The path of the prefix_header.

Returns:

  • (Pathname)

    The path of the prefix_header



29
30
31
32
33
# File 'lib/cocoapods/hooks/library_representation.rb', line 29

def prefix_header_path
  UI.warn "LibraryRepresentation#prefix_header_path is deprecated. " \
    "Use the specification `prefix_header_contents` attribute."
  library.prefix_header_path
end

#projectProject

Returns The Pods project of the sandbox.

Returns:

  • (Project)

    The Pods project of the sandbox.



44
45
46
# File 'lib/cocoapods/hooks/library_representation.rb', line 44

def project
  sandbox.project
end

#sandbox_dirPathname

Returns The path of the Pods dir.

Returns:

  • (Pathname)

    The path of the Pods dir.



23
24
25
# File 'lib/cocoapods/hooks/library_representation.rb', line 23

def sandbox_dir
  sandbox.root
end

#targetPBXNativeTarget

Returns The target generated by the installation process.

Returns:

  • (PBXNativeTarget)

    The target generated by the installation process.



72
73
74
# File 'lib/cocoapods/hooks/library_representation.rb', line 72

def target
  library.target
end

#target_definitionTargetDefinition

Returns The target definition of the library.

Returns:

  • (TargetDefinition)

    The target definition of the library.



50
51
52
# File 'lib/cocoapods/hooks/library_representation.rb', line 50

def target_definition
  library.target_definition
end