Module: Avm::EacAsciidoctorBase0::DocumentsOwner

Included in:
Instances::Build, Sources::Base
Defined in:
lib/avm/eac_asciidoctor_base0/documents_owner.rb

Instance Method Summary collapse

Instance Method Details

#document(subpath) ⇒ Avm::EacAsciidoctorBase0::Sources::Document

Parameters:

  • subpath (Pathname)

Returns:

Raises:

  • (KeyError)


14
15
16
17
# File 'lib/avm/eac_asciidoctor_base0/documents_owner.rb', line 14

def document(subpath)
  documents.find { |d| d.subpath.to_pathname == subpath.to_pathname } ||
    raise(::KeyError, "Document not found with subpath = \"#{subpath}\"")
end

#documentsEnumerable<Avm::EacAsciidoctorBase0::Sources::Document>



20
21
22
# File 'lib/avm/eac_asciidoctor_base0/documents_owner.rb', line 20

def documents
  ::EacRubyUtils::RecursiveBuilder.new(root_document, &:children).result
end

#root_documentObject

Returns:

  • (Object)


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

def root_document
  raise "Abstract method hit: #{__method__}"
end