def initialize_metadata
      metadata_path = self.path.join(METADATA_FILE)

      self.title       = self.name
      self.description = nil
      self.license     = nil

      self.source  = self.uri
      self.website = self.source
      self.authors.clear

      if File.file?(metadata_path)
        metadata = YAML.load_file(metadata_path)

        if (title = metadata['title'])
          self.title = title
        end

        if (description = metadata['description'])
          self.description = description
        end

        if (license = metadata['license'])
          self.license = License.first_or_predefined(:name => license)
        end

        if (uri = metadata['uri'])
          self.uri ||= uri
        end

        if (source = metadata['source'])
          self.source = source
        end

        if (website = metadata['website'])
          self.website = website
        end

        case metadata['authors']
        when Hash
          metadata['authors'].each do |name,email|
            self.authors << Author.first_or_new(:name => name, :email => email)
          end
        when Array
          metadata['authors'].each do |name|
            self.authors << Author.first_or_new(:name => name)
          end
        end
      end

      return self
    end
def initialize_metadata
      metadata_path = self.path.join(METADATA_FILE)

      self.title       = self.name
      self.description = nil
      self.license     = nil

      self.source  = self.uri
      self.website = self.source
      self.authors.clear

      if File.file?(metadata_path)
        metadata = YAML.load_file(metadata_path)

        if (title = metadata['title'])
          self.title = title
        end

        if (description = metadata['description'])
          self.description = description
        end

        if (license = metadata['license'])
          self.license = License.first_or_predefined(:name => license)
        end

        if (uri = metadata['uri'])
          self.uri ||= uri
        end

        if (source = metadata['source'])
          self.source = source
        end

        if (website = metadata['website'])
          self.website = website
        end

        case metadata['authors']
        when Hash
          metadata['authors'].each do |name,email|
            self.authors << Author.first_or_new(:name => name, :email => email)
          end
        when Array
          metadata['authors'].each do |name|
            self.authors << Author.first_or_new(:name => name)
          end
        end
      end

      return self
    end
Loads the metadata from {METADATA_FILE} within the repository.

 @api private