Class: Pod::Podfile::TargetDefinition

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, parent = nil) ⇒ TargetDefinition

Returns a new instance of TargetDefinition.



6
7
8
# File 'lib/cocoapods/podfile.rb', line 6

def initialize(name, parent = nil)
  @name, @parent, @target_dependencies = name, parent, []
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



4
5
6
# File 'lib/cocoapods/podfile.rb', line 4

def name
  @name
end

#parentObject (readonly)

Returns the value of attribute parent.



4
5
6
# File 'lib/cocoapods/podfile.rb', line 4

def parent
  @parent
end

#target_dependenciesObject (readonly)

Returns the value of attribute target_dependencies.



4
5
6
# File 'lib/cocoapods/podfile.rb', line 4

def target_dependencies
  @target_dependencies
end

Instance Method Details

#dependenciesObject

Returns all dependencies of this target, not only the target specific ones in target_dependencies.



16
17
18
# File 'lib/cocoapods/podfile.rb', line 16

def dependencies
  @target_dependencies + (@parent ? @parent.dependencies : [])
end

#lib_nameObject



10
11
12
# File 'lib/cocoapods/podfile.rb', line 10

def lib_name
  name == :default ? "Pods" : "Pods-#{name}"
end