Class: Xcode::Project::PlistChanger
- Inherits:
-
Object
- Object
- Xcode::Project::PlistChanger
- Defined in:
- lib/xcode/project/plist_changer.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#plist_path ⇒ Object
readonly
Returns the value of attribute plist_path.
Instance Method Summary collapse
-
#initialize(plist_path = 'Info.plist') ⇒ PlistChanger
constructor
A new instance of PlistChanger.
- #read ⇒ Object
- #write ⇒ Object
Constructor Details
#initialize(plist_path = 'Info.plist') ⇒ PlistChanger
Returns a new instance of PlistChanger.
8 9 10 11 |
# File 'lib/xcode/project/plist_changer.rb', line 8 def initialize(plist_path = 'Info.plist') @plist_path = plist_path read end |
Instance Attribute Details
#plist_path ⇒ Object (readonly)
Returns the value of attribute plist_path.
6 7 8 |
# File 'lib/xcode/project/plist_changer.rb', line 6 def plist_path @plist_path end |
Instance Method Details
#read ⇒ Object
13 14 15 |
# File 'lib/xcode/project/plist_changer.rb', line 13 def read set(plist[key]) end |
#write ⇒ Object
17 18 19 20 21 |
# 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 |