lib/epubinfo/parser.rb in epubinfo-0.2.4 vs lib/epubinfo/parser.rb in epubinfo-0.3.0

- old
+ new

@@ -10,9 +10,14 @@ def metadata_document @metadata_document ||= load_metadata_file end + def drm_protected? + load_epub if @zipfile.nil? + @drm_protected ||= !!@zipfile.find_entry('META-INF/rights.xml') + end + private def load_epub @zipfile = Zip::ZipFile.open(@path) end