class Xcode::Project::PlistChanger
Attributes
plist_path[R]
Public Class Methods
new(plist_path = 'Info.plist')
click to toggle source
# File lib/xcode/project/plist_changer.rb, line 8 def initialize(plist_path = 'Info.plist') @plist_path = plist_path read end
Public Instance Methods
read()
click to toggle source
# File lib/xcode/project/plist_changer.rb, line 13 def read set(plist[key]) end
write()
click to toggle source
# File lib/xcode/project/plist_changer.rb, line 17 def write plist.tap do |plist| plist[key] = to_s end.save_plist(plist_path) end
Private Instance Methods
key()
click to toggle source
# File lib/xcode/project/plist_changer.rb, line 25 def key self.class.const_get(:KEY) end
plist()
click to toggle source
# File lib/xcode/project/plist_changer.rb, line 29 def plist Plist::parse_xml(plist_path) end