Sha256: 097a18ebf484b22c91579f8c82dd26120845aa0d1d135a160e24b475cdf65bec

Contents?: true

Size: 769 Bytes

Versions: 11

Compression:

Stored size: 769 Bytes

Contents

require 'tmpdir'
require 'epub/ocf/physical_container'
[
  [:ArchiveZip, 'archive_zip'],
  [:Zipruby, 'zipruby']
].each do |(class_name, feature_name)|
  if EPUB::OCF::PhysicalContainer.const_defined? class_name
    require "epub/maker/ocf/physical_container/#{feature_name}"
  end
end

module EPUB
  class OCF
    class PhysicalContainer
      class << self
        def write(container_path, path_name, content)
          open(container_path) {|container|
            container.write(path_name, content)
          }
        end

        def save(container_path, path_name, content)
          warn "EPUB::OCF::PhysicalContainer.#{__method__} is deprecated. Use .write instead"
          write(container_path, path_name, content)
        end
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
epub-maker-0.1.4 lib/epub/maker/ocf/physical_container.rb
epub-maker-0.1.3 lib/epub/maker/ocf/physical_container.rb
epub-maker-0.1.2 lib/epub/maker/ocf/physical_container.rb
epub-maker-0.1.1 lib/epub/maker/ocf/physical_container.rb
epub-maker-0.1.0 lib/epub/maker/ocf/physical_container.rb
epub-maker-0.0.9 lib/epub/maker/ocf/physical_container.rb
epub-maker-0.0.8 lib/epub/maker/ocf/physical_container.rb
epub-maker-0.0.7 lib/epub/maker/ocf/physical_container.rb
epub-maker-0.0.6 lib/epub/maker/ocf/physical_container.rb
epub-maker-0.0.5 lib/epub/maker/ocf/physical_container.rb
epub-maker-0.0.4 lib/epub/maker/ocf/physical_container.rb