Module: Creeker::Utils
Instance Method Summary collapse
Instance Method Details
#expand_to_rels_path(filepath) ⇒ Object
3 4 5 |
# File 'lib/creeker/utils.rb', line 3 def (filepath) filepath.sub(/(\/[^\/]+$)/, '/_rels\1.rels') end |
#file_exist?(path) ⇒ Boolean
7 8 9 |
# File 'lib/creeker/utils.rb', line 7 def file_exist?(path) @book.files.file.exist?(path) end |
#parse_xml(xml_path) ⇒ Object
11 12 13 14 |
# File 'lib/creeker/utils.rb', line 11 def parse_xml(xml_path) doc = @book.files.file.open(xml_path) Nokogiri::XML::Document.parse(doc) end |