Method: Pod::Podfile::DSL#target
- Defined in:
- lib/cocoapods-core/podfile/dsl.rb
#target(name, options = nil) ⇒ void
This method returns an undefined value.
Defines a CocoaPods target and scopes dependencies defined
within the given block. A target should correspond to an Xcode target.
By default the target includes the dependencies defined outside of
the block, unless instructed not to inherit! them.
395 396 397 398 399 400 401 402 403 404 405 406 407 |
# File 'lib/cocoapods-core/podfile/dsl.rb', line 395 def target(name, = nil) if raise Informative, "Unsupported options `#{options}` for " \ "target `#{name}`." end parent = current_target_definition definition = TargetDefinition.new(name, parent) self.current_target_definition = definition yield if block_given? ensure self.current_target_definition = parent end |