Module: CFBundle::Plist
- Defined in:
- lib/cfbundle/plist.rb
Overview
Utility methods for manipulating Property list files.
Class Method Summary collapse
-
.load_info_plist(bundle) ⇒ Hash
Loads the
Info.plist
file in a bundle. -
.load_plist(bundle, path) ⇒ Hash
Loads a Propery list file in a bundle.
Class Method Details
.load_info_plist(bundle) ⇒ Hash
Loads the Info.plist
file in a bundle.
12 13 14 |
# File 'lib/cfbundle/plist.rb', line 12 def load_info_plist(bundle) load_plist(bundle, info_plist_path_in(bundle)) end |
.load_plist(bundle, path) ⇒ Hash
Loads a Propery list file in a bundle.
20 21 22 23 24 |
# File 'lib/cfbundle/plist.rb', line 20 def load_plist(bundle, path) data = bundle.storage.open(path, &:read) plist = CFPropertyList::List.new(data: data) CFPropertyList.native_types(plist.value) end |