Class: EPUB::OCF::PhysicalContainer::UnpackedURI

Inherits:
EPUB::OCF::PhysicalContainer show all
Defined in:
lib/epub/ocf/physical_container/unpacked_uri.rb

Instance Method Summary collapse

Methods inherited from EPUB::OCF::PhysicalContainer

adapter, adapter=, open, read

Constructor Details

#initialize(container_path) ⇒ UnpackedURI

Parameters:



12
13
14
# File 'lib/epub/ocf/physical_container/unpacked_uri.rb', line 12

def initialize(container_path)
  super(URI(container_path))
end

Instance Method Details

#open {|_self| ... } ⇒ Object

Yields:

  • (_self)

Yield Parameters:



16
17
18
# File 'lib/epub/ocf/physical_container/unpacked_uri.rb', line 16

def open
  yield self
end

#read(path_name) ⇒ Object



20
21
22
# File 'lib/epub/ocf/physical_container/unpacked_uri.rb', line 20

def read(path_name)
  (@container_path + path_name).read
end