class EPUB::OCF::PhysicalContainer::UnpackedURI

Public Class Methods

new(container_path) click to toggle source

EPUB URI: example.net/path/to/book/ container.xml: example.net/path/to/book/META-INF/container.xml @param [URI, String] container_path URI of EPUB container’s root directory.

For exapmle, <code>"http://example.net/path/to/book/"</code>, which
should contain <code>"http://example.net/path/to/book/META-INF/container.xml"</code> as its container.xml file. Note that this should end with "/"(slash).
Calls superclass method
# File lib/epub/ocf/physical_container/unpacked_uri.rb, line 12
def initialize(container_path)
  super(URI(container_path))
end

Public Instance Methods

open() { |self| ... } click to toggle source
# File lib/epub/ocf/physical_container/unpacked_uri.rb, line 16
def open
  yield self
end
read(path_name) click to toggle source
# File lib/epub/ocf/physical_container/unpacked_uri.rb, line 20
def read(path_name)
  (@container_path + path_name).read
rescue ::OpenURI::HTTPError => error
  raise NoEntry.from_error(error)
end