class Puppet::Application::Describe

Public Instance Methods

help() click to toggle source
# File lib/puppet/application/describe.rb, line 181
  def help
    <<-'HELP'

puppet-describe(8) -- Display help about resource types
========

SYNOPSIS
--------
Prints help about Puppet resource types, providers, and metaparameters.


USAGE
-----
puppet describe [-h|--help] [-s|--short] [-p|--providers] [-l|--list] [-m|--meta]


OPTIONS
-------
* --help:
  Print this help text

* --providers:
  Describe providers in detail for each type

* --list:
  List all types

* --meta:
  List all metaparameters

* --short:
  List only parameters without detail


EXAMPLE
-------
    $ puppet describe --list
    $ puppet describe file --providers
    $ puppet describe user -s -m


AUTHOR
------
David Lutterkort


COPYRIGHT
---------
Copyright (c) 2011 Puppet Labs, LLC Licensed under the Apache 2.0 License

    HELP
  end
main() click to toggle source
# File lib/puppet/application/describe.rb, line 238
def main
  doc = TypeDoc.new

  if options[:list]
    doc.list_types
  else
    options[:types].each { |name| doc.format_type(name, options) }
  end
end
preinit() click to toggle source
# File lib/puppet/application/describe.rb, line 234
def preinit
  options[:parameters] = true
end
setup() click to toggle source
# File lib/puppet/application/describe.rb, line 248
def setup
  options[:types] = command_line.args.dup
  handle_help(nil) unless options[:list] || options[:types].size > 0
  $stderr.puts "Warning: ignoring types when listing all types" if options[:list] && options[:types].size > 0
end