Class: Gemsurance::Formatters::Yml

Inherits:
Base
  • Object
show all
Defined in:
lib/gemsurance/formatters/yml.rb

Instance Method Summary collapse

Methods inherited from Base

#initialize, #output_path, #sorted_gems

Constructor Details

This class inherits a constructor from Gemsurance::Formatters::Base

Instance Method Details

#formatObject



4
5
6
7
8
9
10
11
12
13
# File 'lib/gemsurance/formatters/yml.rb', line 4

def format
  @extension = "yml"
  gem_hash = {}

  sorted_gems.each do |gem_info|
    gem_hash[gem_info.name] = gem_info.to_hash
  end

  gem_hash.to_yaml
end