Sha256: 3911ba43d218439eb91ab3b8ecd75e4b3ac6f73395cb15dc9f7e7554fd48cb7f
Contents?: true
Size: 829 Bytes
Versions: 4
Compression:
Stored size: 829 Bytes
Contents
# frozen_string_literal: true require 'eac_ruby_utils/core_ext' require 'eac_ruby_utils/recursive_builder' module Avm module EacAsciidoctorBase0 module DocumentsOwner common_concern # @param subpath [Pathname] # @return [Avm::EacAsciidoctorBase0::Sources::Document] # @raise [KeyError] def document(subpath) documents.find { |d| d.subpath.to_pathname == subpath.to_pathname } || raise(::KeyError, "Document not found with subpath = \"#{subpath}\"") end # @return [Enumerable<Avm::EacAsciidoctorBase0::Sources::Document>] def documents ::EacRubyUtils::RecursiveBuilder.new(root_document, &:children).result end # @return [Object] def root_document raise "Abstract method hit: #{__method__}" end end end end
Version data entries
4 entries across 4 versions & 2 rubygems