Class: Pod::Generator::Plist
Instance Attribute Summary
#file_accessors
Class Method Summary
collapse
Instance Method Summary
collapse
#footnote_text, #footnote_title, generators, #header_text, #header_title, #initialize
Class Method Details
.path_from_basepath(path) ⇒ Object
4
5
6
|
# File 'lib/cocoapods/generator/acknowledgements/plist.rb', line 4
def self.path_from_basepath(path)
Pathname.new(path.dirname + "#{path.basename}.plist")
end
|
Instance Method Details
52
53
54
55
56
57
58
|
# File 'lib/cocoapods/generator/acknowledgements/plist.rb', line 52
def
{
:Type => 'PSGroupSpecifier',
:Title => sanitize_encoding(),
:FooterText => sanitize_encoding(),
}
end
|
#hash_for_spec(spec) ⇒ Object
34
35
36
37
38
39
40
41
42
|
# File 'lib/cocoapods/generator/acknowledgements/plist.rb', line 34
def hash_for_spec(spec)
if (license = license_text(spec))
{
:Type => 'PSGroupSpecifier',
:Title => sanitize_encoding(spec.name),
:FooterText => sanitize_encoding(license),
}
end
end
|
44
45
46
47
48
49
50
|
# File 'lib/cocoapods/generator/acknowledgements/plist.rb', line 44
def
{
:Type => 'PSGroupSpecifier',
:Title => sanitize_encoding(),
:FooterText => sanitize_encoding(),
}
end
|
#licenses ⇒ Object
24
25
26
27
28
29
30
31
32
|
# File 'lib/cocoapods/generator/acknowledgements/plist.rb', line 24
def licenses
licences_array = []
specs.each do |spec|
if (hash = hash_for_spec(spec))
licences_array << hash
end
end
licences_array <<
end
|
#plist ⇒ Object
12
13
14
15
16
17
18
|
# File 'lib/cocoapods/generator/acknowledgements/plist.rb', line 12
def plist
{
:Title => plist_title,
:StringsTable => plist_title,
:PreferenceSpecifiers => licenses,
}
end
|
#plist_title ⇒ Object
20
21
22
|
# File 'lib/cocoapods/generator/acknowledgements/plist.rb', line 20
def plist_title
'Acknowledgements'
end
|
#save_as(path) ⇒ Object
8
9
10
|
# File 'lib/cocoapods/generator/acknowledgements/plist.rb', line 8
def save_as(path)
Xcodeproj::PlistHelper.write(plist, path)
end
|