Class: Book
- Inherits:
-
Object
- Object
- Book
- Defined in:
- lib/book.rb
Overview
file book.rb Book Class
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#rating ⇒ Object
readonly
Returns the value of attribute rating.
Instance Method Summary collapse
-
#initialize(name, rating) ⇒ Book
constructor
A new instance of Book.
Constructor Details
#initialize(name, rating) ⇒ Book
Returns a new instance of Book.
6 7 8 9 |
# File 'lib/book.rb', line 6 def initialize(name, ) @name = name = end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
4 5 6 |
# File 'lib/book.rb', line 4 def name @name end |
#rating ⇒ Object (readonly)
Returns the value of attribute rating.
5 6 7 |
# File 'lib/book.rb', line 5 def end |