Class: ComicBook::CBR
- Inherits:
-
Adapter
show all
- Defined in:
- lib/comic_book/cbr.rb,
lib/comic_book/cbr/extractor.rb
Defined Under Namespace
Classes: Extractor
Instance Method Summary
collapse
Methods inherited from Adapter
#images, #images_and_info, #initialize, #pages
Instance Method Details
#archive(_options = {}) ⇒ Object
8
9
10
|
# File 'lib/comic_book/cbr.rb', line 8
def archive _options = {}
raise Error, 'CBR archiving not supported (RAR is proprietary)'
end
|
12
13
14
|
# File 'lib/comic_book/cbr.rb', line 12
def options = {}
Extractor.new(path). options
end
|
#info ⇒ Object
20
21
22
23
24
25
26
27
28
29
30
31
|
# File 'lib/comic_book/cbr.rb', line 20
def info
entries = CLIHelpers.lsar_list path
return nil unless entries.include? 'ComicInfo.xml'
Dir.mktmpdir do |temp_dir|
CLIHelpers. path, temp_dir
xml_path = File.join temp_dir, 'ComicInfo.xml'
return nil unless File.exist? xml_path
ComicInfo.load xml_path
end
end
|