class Puppet::Application::Describe

Public Instance Methods

help() click to toggle source
    # File lib/puppet/application/describe.rb
180   def help
181     <<-HELP
182 
183 puppet-describe(8) -- #{summary}
184 ========
185 
186 SYNOPSIS
187 --------
188 Prints help about Puppet resource types, providers, and metaparameters.
189 
190 
191 USAGE
192 -----
193 puppet describe [-h|--help] [-s|--short] [-p|--providers] [-l|--list] [-m|--meta]
194 
195 
196 OPTIONS
197 -------
198 * --help:
199   Print this help text
200 
201 * --providers:
202   Describe providers in detail for each type
203 
204 * --list:
205   List all types
206 
207 * --meta:
208   List all metaparameters
209 
210 * --short:
211   List only parameters without detail
212 
213 
214 EXAMPLE
215 -------
216     $ puppet describe --list
217     $ puppet describe file --providers
218     $ puppet describe user -s -m
219 
220 
221 AUTHOR
222 ------
223 David Lutterkort
224 
225 
226 COPYRIGHT
227 ---------
228 Copyright (c) 2011 Puppet Inc., LLC Licensed under the Apache 2.0 License
229 
230     HELP
231   end
main() click to toggle source
    # File lib/puppet/application/describe.rb
237 def main
238   doc = TypeDoc.new
239 
240   if options[:list]
241     doc.list_types
242   else
243     options[:types].each { |name| doc.format_type(name, options) }
244   end
245 end
preinit() click to toggle source
    # File lib/puppet/application/describe.rb
233 def preinit
234   options[:parameters] = true
235 end
setup() click to toggle source
    # File lib/puppet/application/describe.rb
247 def setup
248   options[:types] = command_line.args.dup
249   handle_help(nil) unless options[:list] || options[:types].size > 0
250   $stderr.puts "Warning: ignoring types when listing all types" if options[:list] && options[:types].size > 0
251 end
summary() click to toggle source
    # File lib/puppet/application/describe.rb
176 def summary
177   _("Display help about resource types")
178 end