Method: Pod::Podfile::TargetDefinition#platform
- Defined in:
- lib/cocoapods-core/podfile/target_definition.rb
#platform ⇒ Platform
Note:
If no deployment target has been specified a default value is provided.
Returns the platform of the target definition.
621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 |
# File 'lib/cocoapods-core/podfile/target_definition.rb', line 621 def platform name_or_hash = get_hash_value('platform') if name_or_hash if name_or_hash.is_a?(Hash) name = name_or_hash.keys.first.to_sym target = name_or_hash.values.first else name = name_or_hash.to_sym end target ||= PLATFORM_DEFAULTS[name] Platform.new(name, target) else parent.platform unless root? end end |