Class: Inventory::Author
- Inherits:
-
Object
- Object
- Inventory::Author
- Defined in:
- lib/inventory-1.0/author.rb
Overview
An author of the project stored in the list of Authors in the inventory.
Instance Attribute Summary collapse
-
#email ⇒ String
readonly
The email address of the author.
-
#name ⇒ String
readonly
The name of the author.
Instance Method Summary collapse
-
#initialize(name, email) ⇒ Author
constructor
Sets up a new author NAME that can be contacted at EMAIL.
- #to_s ⇒ String
Constructor Details
#initialize(name, email) ⇒ Author
Sets up a new author NAME that can be contacted at EMAIL.
9 10 11 |
# File 'lib/inventory-1.0/author.rb', line 9 def initialize(name, email) @name, @email = name, email end |
Instance Attribute Details
#email ⇒ String (readonly)
Returns The email address of the author.
23 24 25 |
# File 'lib/inventory-1.0/author.rb', line 23 def email @email end |
#name ⇒ String (readonly)
Returns The name of the author.
20 21 22 |
# File 'lib/inventory-1.0/author.rb', line 20 def name @name end |