Module: Puppet::Util::RDoc

Defined in:
lib/puppet/util/rdoc.rb

Class Method Summary collapse

Class Method Details

.manifestdoc(files) ⇒ Object

launch an output to console manifest doc



37
38
39
# File 'lib/puppet/util/rdoc.rb', line 37

def manifestdoc(files)
  raise _("RDOC SUPPORT FOR MANIFEST HAS BEEN REMOVED - See PUP-3638")
end

.output(file, ast) ⇒ Object

Outputs to the console the documentation of a manifest



43
44
45
# File 'lib/puppet/util/rdoc.rb', line 43

def output(file, ast)
  raise _("RDOC SUPPORT FOR MANIFEST HAS BEEN REMOVED - See PUP-3638")
end

.output_astnode_doc(ast) ⇒ Object



47
48
49
# File 'lib/puppet/util/rdoc.rb', line 47

def output_astnode_doc(ast)
  raise _("RDOC SUPPORT FOR MANIFEST HAS BEEN REMOVED - See PUP-3638")
end

.output_resource_doc(code) ⇒ Object



51
52
53
# File 'lib/puppet/util/rdoc.rb', line 51

def output_resource_doc(code)
  raise _("RDOC SUPPORT FOR MANIFEST HAS BEEN REMOVED - See PUP-3638")
end

.rdoc(outputdir, files, charset = nil) ⇒ Object

launch a rdoc documentation process with the files/dir passed in files



9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# File 'lib/puppet/util/rdoc.rb', line 9

def rdoc(outputdir, files, charset = nil)
  # then rdoc
  require 'rdoc/rdoc'
  require 'rdoc/options'

  # load our parser
  require_relative 'rdoc/parser'

  r = RDoc::RDoc.new

  # specify our own format & where to output
  options = ["--fmt", "puppet",
             "--quiet",
             "--exclude", "/modules/[^/]*/spec/.*$",
             "--exclude", "/modules/[^/]*/files/.*$",
             "--exclude", "/modules/[^/]*/tests/.*$",
             "--exclude", "/modules/[^/]*/templates/.*$",
             "--op", outputdir]

  options << "--force-update"
  options += ["--charset", charset] if charset
  options += files

  # launch the documentation process
  r.document(options)
end