Sha256: ab1ccb0c2abc993aca7bd729d59d007742251d278971e9f5ec3bc690a9d9b616

Contents?: true

Size: 960 Bytes

Versions: 22

Compression:

Stored size: 960 Bytes

Contents

# encoding: utf-8


module Epuber
  class Compiler
    module FileTypes
      require_relative 'generated_file'

      class NavFile < GeneratedFile

        # @return [Epuber::Version]
        #
        attr_reader :epub_version

        # @param [Epuber::Version] epub_version
        #
        def initialize(epub_version)
          super()

          @epub_version = epub_version

          properties << :navigation

          self.destination_path = if epub_version >= 3
                                    'nav.xhtml'
                                  else
                                    'nav.ncx'
                                  end

          self.path_type = :manifest
        end

        # @param [Compiler::CompilationContext] compilation_context
        #
        def process(compilation_context)
          gen = NavGenerator.new(compilation_context)
          write_generate(gen.generate_nav.to_s)
        end
      end
    end
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
epuber-0.6.0 lib/epuber/compiler/file_types/nav_file.rb
epuber-0.5.7 lib/epuber/compiler/file_types/nav_file.rb
epuber-0.5.6 lib/epuber/compiler/file_types/nav_file.rb
epuber-0.5.5 lib/epuber/compiler/file_types/nav_file.rb
epuber-0.5.4 lib/epuber/compiler/file_types/nav_file.rb
epuber-0.5.3 lib/epuber/compiler/file_types/nav_file.rb
epuber-0.5.2 lib/epuber/compiler/file_types/nav_file.rb
epuber-0.5.1 lib/epuber/compiler/file_types/nav_file.rb
epuber-0.5.0 lib/epuber/compiler/file_types/nav_file.rb
epuber-0.5.0.beta.5 lib/epuber/compiler/file_types/nav_file.rb
epuber-0.5.0.beta.4 lib/epuber/compiler/file_types/nav_file.rb
epuber-0.5.0.beta.3 lib/epuber/compiler/file_types/nav_file.rb
epuber-0.5.0.beta.2 lib/epuber/compiler/file_types/nav_file.rb
epuber-0.5.0.beta lib/epuber/compiler/file_types/nav_file.rb
epuber-0.4.0 lib/epuber/compiler/file_types/nav_file.rb
epuber-0.3.12 lib/epuber/compiler/file_types/nav_file.rb
epuber-0.3.11 lib/epuber/compiler/file_types/nav_file.rb
epuber-0.3.10 lib/epuber/compiler/file_types/nav_file.rb
epuber-0.3.9 lib/epuber/compiler/file_types/nav_file.rb
epuber-0.3.7 lib/epuber/compiler/file_types/nav_file.rb