disu.se

LicensesClass

Namespace

Inventory

Ancestors
  1. Enumerable

  2. Object

Contains zero or more licenses of the project. Licenses can be added and enumerated. Licenses are set up by passing a block to #initialize and calling #license inside it.

Example: Creating a List of Licenses
Licenses.new{
  license 'LGPLv3+',
          'GNU Lesser General Public License, version 3 or later',
          'http://www.gnu.org/licenses/'
  license 'GPLv3+',
          'GNU General Public License, version 3 or later',
          'http://www.gnu.org/licenses/'
}

Constructor

initialize(*licensesLicense*){ … }?#

Creates a new list of licenses and allows more to be added in the optionally #instance_exec’d block by calling #license inside it.

Instance Methods

license(abbreviationString, nameString, urlString)selfprivate#

Add a License to the list of licenses.

+(otherLicenses)Licenses#

Returns the authors of the receiver and those of other.

each{ |licenseLicense| … }self#

Enumerates the licenses.

eachEnumerator<Author>#

Returns an Enumerator over the licenses.