Sha256: 39e6f443dfe127c2a4bf1d9995615e4726f6240ca1bc21ee06bb81b64880e62d

Contents?: true

Size: 1.19 KB

Versions: 33

Compression:

Stored size: 1.19 KB

Contents

# frozen_string_literal: true

require 'avm/eac_webapp_base0/sources/base'
require 'avm/eac_asciidoctor_base0/sources/runners'
require 'eac_ruby_utils/core_ext'

module Avm
  module EacAsciidoctorBase0
    module Sources
      class Base < ::Avm::EacWebappBase0::Sources::Base
        require_sub __FILE__

        CONTENT_DIRECTORY_SUBPATH = ::Pathname.new('content')
        CONTENT_DOCUMENT_BASENAME = ::Pathname.new('body.adoc')
        MAIN_FILE_SUBPATH = CONTENT_DIRECTORY_SUBPATH.join(
          ::Avm::EacAsciidoctorBase0::Sources::Base::Document::TITLE_BASENAME
        )

        require_sub __FILE__, include_modules: true

        def content_directory
          path.join(CONTENT_DIRECTORY_SUBPATH)
        end

        # @return [Avm::EacAsciidoctorBase0::Sources::Base::InstanceToBuild]
        def instance_to_build
          ::Avm::EacAsciidoctorBase0::Sources::Base::InstanceToBuild.new(self)
        end

        # @return [Avm::EacAsciidoctorBase0::Sources::Base::Document
        def root_document
          ::Avm::EacAsciidoctorBase0::Sources::Base::Document.new(self, nil, nil)
        end

        def valid?
          path.join(MAIN_FILE_SUBPATH).file?
        end
      end
    end
  end
end

Version data entries

33 entries across 33 versions & 2 rubygems

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