Class: Polites::Plist
- Inherits:
-
Object
- Object
- Polites::Plist
- Defined in:
- lib/polites/plist.rb
Overview
Read macos binary .plist files into a Hash by converting them to JSON format
using the macos native plutil
program. This only works on macos.
Instance Method Summary collapse
-
#initialize(path) ⇒ Plist
constructor
A new instance of Plist.
- #to_h ⇒ Hash
Constructor Details
#initialize(path) ⇒ Plist
Returns a new instance of Plist.
11 12 13 |
# File 'lib/polites/plist.rb', line 11 def initialize(path) @path = path end |
Instance Method Details
#to_h ⇒ Hash
16 17 18 |
# File 'lib/polites/plist.rb', line 16 def to_h @content ||= read_plist end |