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/rubyzip.rb,
lib/epub/maker/ocf/physical_container/zipruby.rb,
lib/epub/maker/ocf/physical_container/archive_zip.rb
Defined Under Namespace
Classes: ArchiveZip, Rubyzip, Zipruby
Constant Summary
collapse
- @@mtime =
nil
Class Method Summary
collapse
Class Method Details
.mtime ⇒ Object
19
20
21
|
# File 'lib/epub/maker/ocf/physical_container.rb', line 19
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
32
33
34
|
# File 'lib/epub/maker/ocf/physical_container.rb', line 32
def mtime=(time)
@@mtime = time
end
|
.save(container_path, path_name, content) ⇒ Object
42
43
44
45
|
# File 'lib/epub/maker/ocf/physical_container.rb', line 42
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
36
37
38
39
40
|
# File 'lib/epub/maker/ocf/physical_container.rb', line 36
def write(container_path, path_name, content)
open(container_path) {|container|
container.write(path_name, content, mtime: mtime)
}
end
|