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