Sha256: fadd611cf224c2c40643d816bdce93d5d6d64fc0895f5bff821199e6c1815113
Contents?: true
Size: 552 Bytes
Versions: 10
Compression:
Stored size: 552 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
10 entries across 10 versions & 1 rubygems