Class: Book

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

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

#authorObject

Returns the value of attribute author.



12
13
14
# File 'lib/games_paradise/gui/gosu/books/book.rb', line 12

def author
  @author
end

#idObject (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

#pagesObject

Returns the value of attribute pages.



12
13
14
# File 'lib/games_paradise/gui/gosu/books/book.rb', line 12

def pages
  @pages
end

#publisherObject

Returns the value of attribute publisher.



12
13
14
# File 'lib/games_paradise/gui/gosu/books/book.rb', line 12

def publisher
  @publisher
end