lib/puppet/util/rdoc.rb
# launch a rdoc documenation process
# with the files/dir passed in +files+
launch a rdoc documenation process
with the files/dir passed in +files+
launch a rdoc documenation process with the files / dir passed in + files +
def rdoc(outputdir, files, charset = nil)
    unless Puppet.features.rdoc1?
      raise "the version of RDoc included in Ruby #{::RUBY_VERSION} is not supported"
    end
    begin
      Puppet[:ignoreimport] = true
      require 'rdoc/rdoc'
      require 'rdoc/options'
      require 'puppet/util/rdoc/parser'
      r = RDoc::RDoc.new
      RDoc::RDoc::GENERATORS["puppet"] = RDoc::RDoc::Generator.new(
        "puppet/util/rdoc/generators/puppet_generator.rb",
        :PuppetGenerator,
        "puppet"
      )
      options = [ "--fmt", "puppet",
                  "--quiet",
                  "--exclude", "/modules/[^/]*/files/.*$",
                  "--exclude", "/modules/[^/]*/templates/.*$",
                  "--op", outputdir ]
      options << "--force-update" if Options::OptionList.options.any? { |o| o[0] == "--force-update" }
      options += [ "--charset", charset] if charset
      options += files
      r.document(options)
    rescue RDoc::RDocError => e
      raise Puppet::ParseError.new("RDoc error #{e}")
    end
  end
def rdoc ( outputdir , files , charset = nil ) unless Puppet . features . rdoc1? raise "the version of RDoc included in Ruby #{::RUBY_VERSION} is not supported" end begin Puppet [ :ignoreimport ] = true require 'rdoc/rdoc' require 'rdoc/options' require 'puppet/util/rdoc/parser' r = RDoc :: RDoc . new RDoc :: RDoc :: GENERATORS [ "puppet" ] = RDoc :: RDoc :: Generator . new ( "puppet/util/rdoc/generators/puppet_generator.rb" , :PuppetGenerator , "puppet" ) options = [ "--fmt" , "puppet" , "--quiet" , "--exclude" , "/modules/[^/]*/files/.*$" , "--exclude" , "/modules/[^/]*/templates/.*$" , "--op" , outputdir ] options << "--force-update" if Options :: OptionList . options . any? { | o | o [ 0 ] == "--force-update" } options += [ "--charset" , charset ] if charset options += files r . document ( options ) rescue RDoc :: RDocError => e raise Puppet :: ParseError . new ( "RDoc error #{e}" ) end end
launch a rdoc documenation process
with the files/dir passed in +files+
launch a rdoc documenation process with the files / dir passed in + files +
# then rdoc # load our parser # specify our own format & where to output # launch the documentation process
outputdir
<not_specific>
files
<not_specific>
charset
<not_specific>