def data
      unless @data
        @data = []
        type_names = []
        for module_filename in Dir[File.join(@module_path, "lib/puppet/type/*.rb")]
          require module_filename
          type_name = File.basename(module_filename, ".rb")
          type_names << type_name

          for provider_filename in Dir[File.join(@module_path, "lib/puppet/provider/#{type_name}/*.rb")]
            require provider_filename
          end
        end

        type_names.each do |name|
          if type = Puppet::Type.type(name.to_sym)
            type_hash = {:name => name, :doc => type.doc}
            type_hash[:properties] = attr_doc(type, :property)
            type_hash[:parameters] = attr_doc(type, :param)
            if type.providers.size > 0
              type_hash[:providers] = provider_doc(type)
            end
            @data << type_hash
          else
            Puppet.warning _("Could not find/load type: %{name}") % { name: name }
          end
        end
      end
      @data
    end
def data
      unless @data
        @data = []
        type_names = []
        for module_filename in Dir[File.join(@module_path, "lib/puppet/type/*.rb")]
          require module_filename
          type_name = File.basename(module_filename, ".rb")
          type_names << type_name

          for provider_filename in Dir[File.join(@module_path, "lib/puppet/provider/#{type_name}/*.rb")]
            require provider_filename
          end
        end

        type_names.each do |name|
          if type = Puppet::Type.type(name.to_sym)
            type_hash = {:name => name, :doc => type.doc}
            type_hash[:properties] = attr_doc(type, :property)
            type_hash[:parameters] = attr_doc(type, :param)
            if type.providers.size > 0
              type_hash[:providers] = provider_doc(type)
            end
            @data << type_hash
          else
            Puppet.warning _("Could not find/load type: %{name}") % { name: name }
          end
        end
      end
      @data
    end
Return types for this module. Result is an array of hashes, each of which
 describes a Puppet type. The type description hash structure is:
 * :name => Name of this Puppet type.
 * :doc => Documentation for this type.
 * :properties => Array of hashes representing the type's properties, each
   containing :name and :doc.
 * :parameters => Array of hashes representing the type's parameters, each
   containing :name and :doc.
 * :providers => Array of hashes representing the types providers, each
   containing :name and :doc.
 TODO Write a TypeDescription to encapsulate these structures and logic?