Sha256: 3a015db9c0c0bff2af42d2b03753c2da5f0c9e19424f314934fc22fd967f4378

Contents?: true

Size: 657 Bytes

Versions: 15

Compression:

Stored size: 657 Bytes

Contents

# frozen_string_literal: true

require 'asciidoctor'
require 'eac_ruby_utils/core_ext'

module Avm
  module EacAsciidoctorBase0
    module Sources
      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

Version data entries

15 entries across 15 versions & 2 rubygems

Version Path
avm-eac_asciidoctor_base0-0.25.0 lib/avm/eac_asciidoctor_base0/sources/document/media.rb
eac_tools-0.97.0 sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/sources/document/media.rb
avm-eac_asciidoctor_base0-0.24.0 lib/avm/eac_asciidoctor_base0/sources/document/media.rb
eac_tools-0.96.0 sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/sources/document/media.rb
avm-eac_asciidoctor_base0-0.23.0 lib/avm/eac_asciidoctor_base0/sources/document/media.rb
eac_tools-0.88.0 sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/sources/document/media.rb
eac_tools-0.87.0 sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/sources/document/media.rb
avm-eac_asciidoctor_base0-0.22.1 lib/avm/eac_asciidoctor_base0/sources/document/media.rb
eac_tools-0.86.13 sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/sources/document/media.rb
avm-eac_asciidoctor_base0-0.22.0 lib/avm/eac_asciidoctor_base0/sources/document/media.rb
eac_tools-0.85.0 sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/sources/document/media.rb
eac_tools-0.84.2 sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/sources/document/media.rb
eac_tools-0.84.1 sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/sources/document/media.rb
avm-eac_asciidoctor_base0-0.21.0 lib/avm/eac_asciidoctor_base0/sources/document/media.rb
eac_tools-0.84.0 sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/sources/document/media.rb