Sha256: cead79312d6bef3e257e483c3e8acc4ca9dfb74d474b84245788bdc6e5a7cefb
Contents?: true
Size: 829 Bytes
Versions: 11
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 subáth = \"#{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
11 entries across 11 versions & 2 rubygems