Class: Kronk::PlistParser
- Inherits:
-
Object
- Object
- Kronk::PlistParser
- Defined in:
- lib/kronk/plist_parser.rb
Overview
Simple plist wrapper to support Kronk’s parser interface.
Class Method Summary collapse
-
.parse(plist) ⇒ Object
Wrapper for Plist.parse_xml.
Class Method Details
.parse(plist) ⇒ Object
Wrapper for Plist.parse_xml
11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/kronk/plist_parser.rb', line 11 def self.parse plist require 'plist' Plist.parse_xml(plist) || raise(ParserError, "invalid Plist") rescue RuntimeError raise ParserError, "unparsable Plist" rescue LoadError => e raise unless e. =~ /-- plist/ raise MissingDependency, "Please install the plist gem and try again" end |