class LaunchdTools::PathContent
Attributes
path[R]
Public Class Methods
new(path)
click to toggle source
# File lib/launchd_tools/path_content.rb, line 4 def initialize(path) @path = path end
Public Instance Methods
binary?()
click to toggle source
# File lib/launchd_tools/path_content.rb, line 16 def binary? f = File.open(path, "r") f.read(6) == "bplist" ensure f.close if f end
to_s()
click to toggle source
# File lib/launchd_tools/path_content.rb, line 8 def to_s if binary? `plutil -convert xml1 -o /dev/stdout '#{path}'` else File.read(path) end end