Class: Polites::Plist

Inherits:
Object
  • Object
show all
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

Constructor Details

#initialize(path) ⇒ Plist

Returns a new instance of Plist.

Parameters:

  • path (#to_s)


11
12
13
# File 'lib/polites/plist.rb', line 11

def initialize(path)
  @path = path
end

Instance Method Details

#to_hHash

Returns:

  • (Hash)


16
17
18
# File 'lib/polites/plist.rb', line 16

def to_h
  @content ||= read_plist
end