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

Inherits:
Object
  • Object
show all
Defined in:
lib/avm/eac_asciidoctor_base0/sources/base/document.rb,
lib/avm/eac_asciidoctor_base0/sources/base/document/media.rb,
lib/avm/eac_asciidoctor_base0/sources/base/document/title.rb

Defined Under Namespace

Modules: Media, Title

Instance Method Summary collapse

Instance Method Details

#body_pathPathname

Absolute path to the Asciidoctor file.

Returns:

  • (Pathname)


19
20
21
22
23
# File 'lib/avm/eac_asciidoctor_base0/sources/base/document.rb', line 19

def body_path
  root_path.join(
    ::Avm::EacAsciidoctorBase0::Sources::Base::CONTENT_DOCUMENT_BASENAME
  )
end

#root_pathPathname

Absolute path to the document’s source root.

Returns:

  • (Pathname)


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

def root_path
  source.content_directory.join(subpath)
end

#subpathPathname

Returns:

  • (Pathname)


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

def subpath
  parent_document.if_present('.'.to_pathname) { |pd| pd.subpath.join(basename) }
end