2014-05-26 05:59:46 +00:00
|
|
|
require 'yard'
|
|
|
|
|
|
|
|
# TODO: As far as I can tell, monkeypatching is the officially recommended way
|
|
|
|
# to extend these tools to cover custom usecases. Follow up on the YARD mailing
|
|
|
|
# list or IRC to see if there is a better way.
|
|
|
|
|
|
|
|
class YARD::CLI::Yardoc
|
|
|
|
def all_objects
|
2014-05-30 16:28:25 +00:00
|
|
|
YARD::Registry.all(:root, :module, :class, :hostclass, :definedtype)
|
2014-05-26 05:59:46 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
class YARD::CLI::Stats
|
|
|
|
def stats_for_hostclasses
|
|
|
|
output 'Puppet Classes', *type_statistics(:hostclass)
|
|
|
|
end
|
2014-05-30 16:28:25 +00:00
|
|
|
|
|
|
|
def stats_for_definedtypes
|
|
|
|
output 'Puppet Types', *type_statistics(:definedtype)
|
|
|
|
end
|
2014-05-26 05:59:46 +00:00
|
|
|
end
|