Class: EPUB::OCF::PhysicalContainer
- Inherits:
-
Object
- Object
- EPUB::OCF::PhysicalContainer
show all
- Defined in:
- lib/epub/maker/ocf/physical_container.rb,
lib/epub/maker/ocf/physical_container/zipruby.rb,
lib/epub/maker/ocf/physical_container/archive_zip.rb
Defined Under Namespace
Classes: ArchiveZip, Zipruby
Constant Summary
collapse
- @@mtime =
nil
Class Method Summary
collapse
Class Method Details
.mtime ⇒ Object
18
19
20
|
# File 'lib/epub/maker/ocf/physical_container.rb', line 18
def mtime
@@mtime
end
|
.mtime=(time) ⇒ Time
Sets mtime, which is used when setting mtime of file in EPUB(ZIP) archive. Currently supported for only ArchiveZip adapter
31
32
33
|
# File 'lib/epub/maker/ocf/physical_container.rb', line 31
def mtime=(time)
@@mtime = time
end
|
.save(container_path, path_name, content) ⇒ Object
41
42
43
44
|
# File 'lib/epub/maker/ocf/physical_container.rb', line 41
def save(container_path, path_name, content)
warn "EPUB::OCF::PhysicalContainer.#{__method__} is deprecated. Use .write instead"
write(container_path, path_name, content, mtime: mtime)
end
|
.write(container_path, path_name, content) ⇒ Object
35
36
37
38
39
|
# File 'lib/epub/maker/ocf/physical_container.rb', line 35
def write(container_path, path_name, content)
open(container_path) {|container|
container.write(path_name, content, mtime: mtime)
}
end
|