Sha256: 0e839dfe0b0fdf43e8db0268409035f7200576a8232edde12be8f00ea8149519

Contents?: true

Size: 349 Bytes

Versions: 2

Compression:

Stored size: 349 Bytes

Contents

module Gem

  require 'gem_specification'
  
  class << self
  
    def licenses
      licenses = {}
      Gem.loaded_specs.each do |key, spec|
        spec.licenses.each do |license|
          licenses[license.capitalize.to_sym] ||= []
          licenses[license.capitalize.to_sym] << spec
        end
      end
      licenses
    end
  
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
gem-licenses-0.1.2 lib/gem_licenses.rb
gem-licenses-0.1.1 lib/gem_licenses.rb