Class: Author
- Inherits:
-
Object
- Object
- Author
- Defined in:
- lib/cite_mapper.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
- #[](id) ⇒ Object
- #add_work(id, name) ⇒ Object
-
#initialize(id, name) ⇒ Author
constructor
A new instance of Author.
Constructor Details
#initialize(id, name) ⇒ Author
Returns a new instance of Author.
57 58 59 60 61 |
# File 'lib/cite_mapper.rb', line 57 def initialize(id, name) @id = id @name = name @works = {} end |
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
55 56 57 |
# File 'lib/cite_mapper.rb', line 55 def id @id end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
55 56 57 |
# File 'lib/cite_mapper.rb', line 55 def name @name end |