Method: TypeDoc#list_types
- Defined in:
- lib/puppet/application/describe.rb
#list_types ⇒ Object
66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 |
# File 'lib/puppet/application/describe.rb', line 66 def list_types puts "These are the types known to puppet:\n" @types.keys.sort_by(&:to_s).each do |name| type = @types[name] s = type.doc.gsub(/\s+/, " ") if s.empty? s = ".. no documentation .." else n = s.index(".") || s.length if n > 45 s = s[0, 45] + " ..." else s = s[0, n] end end printf "%-15s - %s\n", name, s end end |