Class: Pod::Podfile::TargetDefinition
- Inherits:
-
Object
- Object
- Pod::Podfile::TargetDefinition
- Defined in:
- lib/cocoapods/podfile.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#parent ⇒ Object
readonly
Returns the value of attribute parent.
-
#target_dependencies ⇒ Object
readonly
Returns the value of attribute target_dependencies.
Instance Method Summary collapse
-
#dependencies ⇒ Object
Returns all dependencies of this target, not only the target specific ones in
target_dependencies. -
#initialize(name, parent = nil) ⇒ TargetDefinition
constructor
A new instance of TargetDefinition.
- #lib_name ⇒ Object
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
#name ⇒ Object (readonly)
Returns the value of attribute name.
4 5 6 |
# File 'lib/cocoapods/podfile.rb', line 4 def name @name end |
#parent ⇒ Object (readonly)
Returns the value of attribute parent.
4 5 6 |
# File 'lib/cocoapods/podfile.rb', line 4 def parent @parent end |
#target_dependencies ⇒ Object (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
#dependencies ⇒ Object
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_name ⇒ Object
10 11 12 |
# File 'lib/cocoapods/podfile.rb', line 10 def lib_name name == :default ? "Pods" : "Pods-#{name}" end |