Module: Docrb

Defined in:
lib/docrb.rb,
lib/docrb/spec.rb,
lib/docrb/version.rb,
lib/docrb/doc_compiler.rb

Overview

Docrb implements a source and documentation parser for Ruby projects

Defined Under Namespace

Classes: DocCompiler, Error, Spec

Constant Summary collapse

VERSION =
"0.3.6"

Class Method Summary collapse

Class Method Details

.parse_folder(base, input) ⇒ Object

Public: Parses a given input folder recursively and returns all sources and documentations

inp - Folder to be parsed. Finds all .rb files recursively from this path.

Returns a NodeArray with parsed nodes.



24
25
26
27
28
29
30
31
32
# File 'lib/docrb.rb', line 24

def self.parse_folder(base, input)
  source = Docrb::Parser
    .new
    .tap { |parser| Dir["#{base}/**/*.rb"].each { parser.parse(_1) } }
    .tap(&:finalize)
  spec = Spec.parse_folder(input)

  [source, spec]
end