Module: Y2Packager::LicensesHandlers

Defined in:
library/packages/src/lib/y2packager/licenses_handlers.rb,
library/packages/src/lib/y2packager/licenses_handlers/rpm.rb,
library/packages/src/lib/y2packager/licenses_handlers/base.rb,
library/packages/src/lib/y2packager/licenses_handlers/libzypp.rb,
library/packages/src/lib/y2packager/licenses_handlers/tarball.rb

Overview

This module contains licenses handlers

Licenses can be retrieved from different places (libzypp, URLs, etc.). The classes defined in this module are able to interact with these sources in order to find out, for instance, whether a license must be accepted.

Defined Under Namespace

Classes: Base, Libzypp, Rpm, Tarball

Class Method Summary collapse

Class Method Details

.for(fetcher, product_name) ⇒ LicenseHandlers::Base

Return the proper license handler based on given fetcher


30
31
32
33
34
35
# File 'library/packages/src/lib/y2packager/licenses_handlers.rb', line 30

def self.for(fetcher, product_name)
  type = fetcher.class.name.split("::").last
  klass = const_get(type.to_s.capitalize)

  klass.new(product_name)
end