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 
  
  
  
  
    
      
6
7
8 
     | 
    
      # File 'lib/cocoapods/generator/acknowledgements/plist.rb', line 6
def self.path_from_basepath(path)
  Pathname.new(path.dirname + "#{path.basename}.plist")
end
     | 
  
 
    
   
  
    Instance Method Details
    
      
  
  
    
      
66
67
68
69
70
71
72 
     | 
    
      # File 'lib/cocoapods/generator/acknowledgements/plist.rb', line 66
def 
  {
    :Type => 'PSGroupSpecifier',
    :Title => sanitize_encoding(),
    :FooterText => sanitize_encoding(),
  }
end
     | 
  
 
    
      
  
  
    #generate  ⇒ String 
  
  
  
  
    
Returns The contents of the plist.
   
 
  
    
      
16
17
18
19
20
21 
     | 
    
      # File 'lib/cocoapods/generator/acknowledgements/plist.rb', line 16
def generate
  plist = Nanaimo::Plist.new(plist_hash, :xml)
  contents = StringIO.new
  Nanaimo::Writer::XMLWriter.new(plist, :pretty => true, :output => contents, :strict => false).write
  contents.string
end 
     | 
  
 
    
      
  
  
    #hash_for_spec(spec)  ⇒ Object 
  
  
  
  
    
      
45
46
47
48
49
50
51
52
53
54
55
56 
     | 
    
      # File 'lib/cocoapods/generator/acknowledgements/plist.rb', line 45
def hash_for_spec(spec)
  if (license = license_text(spec))
    hash =  {
      :Type => 'PSGroupSpecifier',
      :Title => sanitize_encoding(spec.name),
      :FooterText => sanitize_encoding(license),
    }
    hash[:License] = sanitize_encoding(spec.license[:type]) if spec.license[:type]
    hash
  end
end
     | 
  
 
    
      
  
  
    
      
58
59
60
61
62
63
64 
     | 
    
      # File 'lib/cocoapods/generator/acknowledgements/plist.rb', line 58
def 
  {
    :Type => 'PSGroupSpecifier',
    :Title => sanitize_encoding(),
    :FooterText => sanitize_encoding(),
  }
end
     | 
  
 
    
      
  
  
    #licenses  ⇒ Object 
  
  
  
  
    
      
35
36
37
38
39
40
41
42
43 
     | 
    
      # File 'lib/cocoapods/generator/acknowledgements/plist.rb', line 35
def licenses
  licences_array = []
  specs.each do |spec|
    if (hash = hash_for_spec(spec))
      licences_array << hash
    end
  end
  licences_array << 
end
     | 
  
 
    
      
  
  
    #plist_hash  ⇒ Object 
  
  
  
  
    
      
23
24
25
26
27
28
29 
     | 
    
      # File 'lib/cocoapods/generator/acknowledgements/plist.rb', line 23
def plist_hash
  {
    :Title => plist_title,
    :StringsTable => plist_title,
    :PreferenceSpecifiers => licenses,
  }
end
     | 
  
 
    
      
  
  
    #plist_title  ⇒ Object 
  
  
  
  
    
      
31
32
33 
     | 
    
      # File 'lib/cocoapods/generator/acknowledgements/plist.rb', line 31
def plist_title
  'Acknowledgements'
end 
     | 
  
 
    
      
  
  
    #save_as(path)  ⇒ Object 
  
  
  
  
    
      
10
11
12 
     | 
    
      # File 'lib/cocoapods/generator/acknowledgements/plist.rb', line 10
def save_as(path)
  Xcodeproj::Plist.write_to_path(plist_hash, path)
end 
     |