Class: Inventory::License
- Inherits:
-
Object
- Object
- Inventory::License
- Defined in:
- lib/inventory-1.0/license.rb
Overview
A license used by the project stored in the list of Licenses in the inventory.
Instance Attribute Summary collapse
-
#abbreviation ⇒ String
readonly
The abbreviation of the #name of the license.
-
#name ⇒ String
readonly
The name of the license.
-
#url ⇒ String
readonly
The URL at which the license can be found.
Instance Method Summary collapse
-
#initialize(abbreviation, name, url) ⇒ License
constructor
Sets up a new license NAME, often referred to via ABBREVIATION, than can be found at URL.
-
#to_s ⇒ String
The #abbreviation of the license.
Constructor Details
#initialize(abbreviation, name, url) ⇒ License
Sets up a new license NAME, often referred to via ABBREVIATION, than can be found at URL.
12 13 14 |
# File 'lib/inventory-1.0/license.rb', line 12 def initialize(abbreviation, name, url) @abbreviation, @name, @url = abbreviation, name, url end |
Instance Attribute Details
#abbreviation ⇒ String (readonly)
Returns The abbreviation of the #name of the license.
22 23 24 |
# File 'lib/inventory-1.0/license.rb', line 22 def abbreviation @abbreviation end |
#name ⇒ String (readonly)
Returns The name of the license.
25 26 27 |
# File 'lib/inventory-1.0/license.rb', line 25 def name @name end |
#url ⇒ String (readonly)
Returns The URL at which the license can be found.
28 29 30 |
# File 'lib/inventory-1.0/license.rb', line 28 def url @url end |
Instance Method Details
#to_s ⇒ String
Returns The #abbreviation of the license.
17 18 19 |
# File 'lib/inventory-1.0/license.rb', line 17 def to_s abbreviation.dup end |