Class: Avm::EacAsciidoctorBase0::Sources::Base

Inherits:
Avm::EacWebappBase0::Sources::Base
  • Object
show all
Includes:
DocumentsOwner
Defined in:
lib/avm/eac_asciidoctor_base0/sources/base.rb,
lib/avm/eac_asciidoctor_base0/sources/base/theme.rb,
lib/avm/eac_asciidoctor_base0/sources/base/instance_to_build.rb

Defined Under Namespace

Modules: Theme Classes: InstanceToBuild

Constant Summary collapse

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

Instance Method Summary collapse

Methods included from DocumentsOwner

#document, #documents

Instance Method Details

#build(options = {}) ⇒ Avm::EacAsciidoctorBase0::Instances::Build

Parameters:

  • options (Hash) (defaults to: {})

Returns:



25
26
27
# File 'lib/avm/eac_asciidoctor_base0/sources/base.rb', line 25

def build(options = {})
  ::Avm::EacAsciidoctorBase0::Instances::Build.new(instance_to_build, options)
end

#content_directoryObject



29
30
31
# File 'lib/avm/eac_asciidoctor_base0/sources/base.rb', line 29

def content_directory
  path.join(CONTENT_DIRECTORY_SUBPATH)
end

#instance_to_buildAvm::EacAsciidoctorBase0::Sources::Base::InstanceToBuild



34
35
36
# File 'lib/avm/eac_asciidoctor_base0/sources/base.rb', line 34

def instance_to_build
  ::Avm::EacAsciidoctorBase0::Sources::Base::InstanceToBuild.new(self)
end

#root_documentAvm::EacAsciidoctorBase0::Sources::Document

Returns Avm::EacAsciidoctorBase0::Sources::Document.

Returns:



39
40
41
# File 'lib/avm/eac_asciidoctor_base0/sources/base.rb', line 39

def root_document
  ::Avm::EacAsciidoctorBase0::Sources::Document.new(self, nil, nil)
end

#valid?Boolean

Returns:

  • (Boolean)


43
44
45
# File 'lib/avm/eac_asciidoctor_base0/sources/base.rb', line 43

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