Method: RunLoop::PlistBuddy#plist_read
- Defined in:
- lib/run_loop/plist_buddy.rb
#plist_read(key, file, opts = {}) ⇒ String
Reads key from file and returns the result.
22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/run_loop/plist_buddy.rb', line 22 def plist_read(key, file, opts={}) if key.nil? or key.length == 0 raise(ArgumentError, "key '#{key}' must not be nil or empty") end cmd = build_plist_cmd(:print, {:key => key}, file) success, output = execute_plist_cmd(cmd, file, opts) if !success nil else output end end |