Sha256: 99d4dca385c661a3bcadd28f4c340ee79b35a6328eb1e7b5166ba7c97b2db716

Contents?: true

Size: 712 Bytes

Versions: 43

Compression:

Stored size: 712 Bytes

Contents

# frozen_string_literal: true

require 'asciidoctor'
require 'eac_ruby_utils/core_ext'

module Avm
  module EacAsciidoctorBase0
    module Sources
      class Base
        class Document
          module Media
            MEDIA_DIRECTORY_BASENAME = '_media'

            def copy_media_directory_to(target_directory_path)
              return unless media_directory.directory?

              target_directory_path.parent.mkpath
              ::FileUtils.copy_entry(media_directory, target_directory_path)
            end

            # @return [Pathname]
            def media_directory
              root_path.join(MEDIA_DIRECTORY_BASENAME)
            end
          end
        end
      end
    end
  end
end

Version data entries

43 entries across 43 versions & 2 rubygems

Version Path
avm-eac_asciidoctor_base0-0.20.0 lib/avm/eac_asciidoctor_base0/sources/base/document/media.rb
eac_tools-0.83.0 sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/sources/base/document/media.rb
eac_tools-0.82.0 sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/sources/base/document/media.rb
eac_tools-0.81.0 sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/sources/base/document/media.rb
eac_tools-0.80.0 sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/sources/base/document/media.rb
eac_tools-0.79.0 sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/sources/base/document/media.rb
eac_tools-0.78.0 sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/sources/base/document/media.rb
eac_tools-0.77.1 sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/sources/base/document/media.rb
eac_tools-0.77.0 sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/sources/base/document/media.rb
eac_tools-0.76.1 sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/sources/base/document/media.rb
eac_tools-0.76.0 sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/sources/base/document/media.rb
eac_tools-0.75.2 sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/sources/base/document/media.rb
eac_tools-0.75.1 sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/sources/base/document/media.rb
eac_tools-0.75.0 sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/sources/base/document/media.rb
eac_tools-0.74.1 sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/sources/base/document/media.rb
eac_tools-0.74.0 sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/sources/base/document/media.rb
eac_tools-0.73.0 sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/sources/base/document/media.rb
eac_tools-0.72.0 sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/sources/base/document/media.rb
eac_tools-0.70.1 sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/sources/base/document/media.rb
eac_tools-0.70.0 sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/sources/base/document/media.rb