Class: Book
- Inherits:
-
Object
- Object
- Book
- Defined in:
- lib/booksr/book.rb
Instance Attribute Summary collapse
-
#authors ⇒ Object
readonly
Returns the value of attribute authors.
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#isbn10 ⇒ Object
readonly
Returns the value of attribute isbn10.
-
#isbn13 ⇒ Object
readonly
Returns the value of attribute isbn13.
-
#lang ⇒ Object
readonly
Returns the value of attribute lang.
-
#page_count ⇒ Object
readonly
Returns the value of attribute page_count.
-
#published_date ⇒ Object
readonly
Returns the value of attribute published_date.
-
#publisher ⇒ Object
readonly
Returns the value of attribute publisher.
-
#subtitle ⇒ Object
readonly
Returns the value of attribute subtitle.
-
#title ⇒ Object
readonly
Returns the value of attribute title.
Instance Method Summary collapse
-
#initialize(info) ⇒ Book
constructor
A new instance of Book.
Constructor Details
#initialize(info) ⇒ Book
Returns a new instance of Book.
5 6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/booksr/book.rb', line 5 def initialize(info) @title = info[:title] @subtitle = info[:subtitle] @authors = info[:authors] @published_date = info[:published_date] @publisher = info[:publisher] @description = info[:description] @page_count = info[:page_count] @lang = info[:lang] @isbn13 = info[:isbn13] @isbn10 = info[:isbn10] end |
Instance Attribute Details
#authors ⇒ Object (readonly)
Returns the value of attribute authors.
2 3 4 |
# File 'lib/booksr/book.rb', line 2 def @authors end |
#description ⇒ Object (readonly)
Returns the value of attribute description.
2 3 4 |
# File 'lib/booksr/book.rb', line 2 def description @description end |
#isbn10 ⇒ Object (readonly)
Returns the value of attribute isbn10.
3 4 5 |
# File 'lib/booksr/book.rb', line 3 def isbn10 @isbn10 end |
#isbn13 ⇒ Object (readonly)
Returns the value of attribute isbn13.
3 4 5 |
# File 'lib/booksr/book.rb', line 3 def isbn13 @isbn13 end |
#lang ⇒ Object (readonly)
Returns the value of attribute lang.
3 4 5 |
# File 'lib/booksr/book.rb', line 3 def lang @lang end |
#page_count ⇒ Object (readonly)
Returns the value of attribute page_count.
3 4 5 |
# File 'lib/booksr/book.rb', line 3 def page_count @page_count end |
#published_date ⇒ Object (readonly)
Returns the value of attribute published_date.
2 3 4 |
# File 'lib/booksr/book.rb', line 2 def published_date @published_date end |
#publisher ⇒ Object (readonly)
Returns the value of attribute publisher.
2 3 4 |
# File 'lib/booksr/book.rb', line 2 def publisher @publisher end |
#subtitle ⇒ Object (readonly)
Returns the value of attribute subtitle.
2 3 4 |
# File 'lib/booksr/book.rb', line 2 def subtitle @subtitle end |
#title ⇒ Object (readonly)
Returns the value of attribute title.
2 3 4 |
# File 'lib/booksr/book.rb', line 2 def title @title end |