Class Licensee::License
In: lib/licensee/license.rb
Parent: Object

Methods

==   all   body   content   featured   featured?   find   gpl?   hidden?   inspect   keys   license_dir   license_files   meta   name   name_without_version   new   nickname   path   pseudo_license?   rules   text   to_s   url  

Included Modules

Licensee::ContentHelper

Constants

YAML_DEFAULTS = { 'featured' => false, 'hidden' => true   These should be in sync with choosealicense.com‘s collection defaults
PSEUDO_LICENSES = %w(other no-license).freeze   Pseudo-license are license placeholders with no content

`other` - The project had a license, but we were not able to detect it `no-license` - The project is not licensed (e.g., all rights reserved)

Note: A lack of detected license will be a nil license

External Aliases

find -> []
find -> find_by_key

Attributes

key  [R] 

Public Class methods

All license objects defined via Licensee (via choosealicense.com)

Options:

  • :hidden - boolean, return hidden licenses (default: false)
  • :featured - boolean, return only (non)featured licenses (default: all)

Returns an Array of License objects.

Public Instance methods

body()

Alias for content

The license body (e.g., contents - frontmatter)

featured()

Alias for featured?

License metadata from YAML front matter with defaults merged in

Returns the human-readable license name

Path to vendored license file on disk

Returns a hash in the form of rule_group => rules describing what you legally can and can‘t do with the given license

text()

Alias for content

to_s()

Alias for content

[Validate]