Sha256: d3b95397b34b92d7d06301dd98654a02b71294a28edcf61617829855819eecfc
Contents?: true
Size: 553 Bytes
Versions: 5
Compression:
Stored size: 553 Bytes
Contents
# frozen_string_literal: true module Epuber module Helper # @param [Book::TocItem] toc_item # @param [Compiler::FileResolver] file_resolver # @param [String] context_path # # @return [String] # def self.destination_path_for_toc_item(toc_item, file_resolver, context_path) file = file_resolver.file_from_request(toc_item.file_request) path = [file.final_destination_path, toc_item.file_fragment].compact.join('#') Pathname.new(path).relative_path_from(Pathname.new(context_path)).to_s end end end
Version data entries
5 entries across 5 versions & 1 rubygems
Version | Path |
---|---|
epuber-0.7.4 | lib/epuber/helper.rb |
epuber-0.7.3 | lib/epuber/helper.rb |
epuber-0.7.2 | lib/epuber/helper.rb |
epuber-0.7.1 | lib/epuber/helper.rb |
epuber-0.7.0 | lib/epuber/helper.rb |