Skip to content

Instantly share code, notes, and snippets.

@mokolabs
Created June 13, 2012 00:01
Show Gist options
  • Save mokolabs/2920913 to your computer and use it in GitHub Desktop.
Save mokolabs/2920913 to your computer and use it in GitHub Desktop.
def initialize(file)
if File.directory?(file)
file = file + "/data.plist"
end
if File.read(file, 2).unpack('CC') == [0x1f, 0x8b]
file = Zlib::GzipReader.open(file).read
end
@stencil = Plist::parse_xml(file)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment