module Shenzhen::PlistBuddy
Public Class Methods
print(file, key)
click to toggle source
# File lib/shenzhen/plistbuddy.rb, line 3 def print(file, key) output = `/usr/libexec/PlistBuddy -c "Print :#{key}" "#{file}" 2> /dev/null` !output || output.empty? || /Does Not Exist/ === output ? nil : output.strip end
set(file, key, value)
click to toggle source
# File lib/shenzhen/plistbuddy.rb, line 9 def set(file, key, value) output = `/usr/libexec/PlistBuddy -c "Set #{key} #{value}" "#{file}" 2>&1` output == "" ? value : nil end