Method: Pod::Podfile.from_hash
- Defined in:
- lib/cocoapods-core/podfile.rb
.from_hash(hash, path = nil) ⇒ Podfile
Configures a new Podfile from the given hash.
369 370 371 372 373 374 375 376 377 378 |
# File 'lib/cocoapods-core/podfile.rb', line 369 def self.from_hash(hash, path = nil) internal_hash = hash.dup target_definitions = internal_hash.delete('target_definitions') || [] podfile = Podfile.new(path, internal_hash) target_definitions.each do |definition_hash| definition = TargetDefinition.from_hash(definition_hash, podfile) podfile.root_target_definitions << definition end podfile end |