Class: Pod::Generator::InfoPlistFile

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

Overview

Generates Info.plist files. A Info.plist file is generated for each Pod and for each Pod target definition, that requires to be built as framework. It states public attributes.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(version, platform, bundle_package_type = :fmwk, additional_entries = {}) ⇒ InfoPlistFile

Initialize a new instance


32
33
34
35
36
37
# File 'lib/cocoapods/generator/info_plist_file.rb', line 32

def initialize(version, platform, bundle_package_type = :fmwk, additional_entries = {})
  @version = version
  @platform = platform
  @bundle_package_type = bundle_package_type
  @additional_entries = additional_entries
end

Instance Attribute Details

#additional_entriesHash (readonly)


23
24
25
# File 'lib/cocoapods/generator/info_plist_file.rb', line 23

def additional_entries
  @additional_entries
end

#bundle_package_typeSymbol (readonly)


19
20
21
# File 'lib/cocoapods/generator/info_plist_file.rb', line 19

def bundle_package_type
  @bundle_package_type
end

#platformPlatform (readonly)


14
15
16
# File 'lib/cocoapods/generator/info_plist_file.rb', line 14

def platform
  @platform
end

#versionString (readonly)


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

def version
  @version
end

Instance Method Details

#generateString

Generates the contents of the Info.plist


57
58
59
# File 'lib/cocoapods/generator/info_plist_file.rb', line 57

def generate
  to_plist(info)
end

#save_as(path) ⇒ void

This method returns an undefined value.

Generates and saves the Info.plist to the given path.


46
47
48
49
50
51
# File 'lib/cocoapods/generator/info_plist_file.rb', line 46

def save_as(path)
  contents = generate
  path.open('w') do |f|
    f.write(contents)
  end
end