Class: Book
- Inherits:
-
Object
- Object
- Book
- Defined in:
- lib/games_paradise/gui/gosu/books/makenewbook.rb,
lib/games_paradise/gui/gosu/books/book.rb
Overview
This code can be used to generate a new book.
Instance Attribute Summary collapse
-
#author ⇒ Object
Returns the value of attribute author.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#pages ⇒ Object
Returns the value of attribute pages.
-
#publisher ⇒ Object
Returns the value of attribute publisher.
Instance Method Summary collapse
-
#initialize(id = 0) ⇒ Book
constructor
A new instance of Book.
Constructor Details
#initialize(id = 0) ⇒ Book
Returns a new instance of Book.
13 14 15 16 17 |
# File 'lib/games_paradise/gui/gosu/books/book.rb', line 13 def initialize @author = '' @publisher = '' @pages = [] end |
Instance Attribute Details
#author ⇒ Object
Returns the value of attribute author.
12 13 14 |
# File 'lib/games_paradise/gui/gosu/books/book.rb', line 12 def @author end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
5 6 7 |
# File 'lib/games_paradise/gui/gosu/books/makenewbook.rb', line 5 def id @id end |
#pages ⇒ Object
Returns the value of attribute pages.
12 13 14 |
# File 'lib/games_paradise/gui/gosu/books/book.rb', line 12 def pages @pages end |
#publisher ⇒ Object
Returns the value of attribute publisher.
12 13 14 |
# File 'lib/games_paradise/gui/gosu/books/book.rb', line 12 def publisher @publisher end |