Class: Alexandrite::Book
- Inherits:
-
Object
- Object
- Alexandrite::Book
- Defined in:
- lib/alexandrite_books.rb
Overview
Create a book objects
Instance Attribute Summary collapse
-
#authors ⇒ Object
Returns the value of attribute authors.
-
#categories ⇒ Object
Returns the value of attribute categories.
-
#country ⇒ Object
Returns the value of attribute country.
-
#ddc ⇒ Object
Returns the value of attribute ddc.
-
#description ⇒ Object
Returns the value of attribute description.
-
#error_message ⇒ Object
Returns the value of attribute error_message.
-
#isbn10 ⇒ Object
Returns the value of attribute isbn10.
-
#isbn13 ⇒ Object
Returns the value of attribute isbn13.
-
#language ⇒ Object
Returns the value of attribute language.
-
#lcc ⇒ Object
Returns the value of attribute lcc.
-
#page_count ⇒ Object
Returns the value of attribute page_count.
-
#published_date ⇒ Object
Returns the value of attribute published_date.
-
#publisher ⇒ Object
Returns the value of attribute publisher.
-
#suggested_classifications ⇒ Object
Returns the value of attribute suggested_classifications.
-
#title ⇒ Object
Returns the value of attribute title.
Class Method Summary collapse
Instance Method Summary collapse
- #add_classification_suggested(suggestions) ⇒ NilClass
- #add_ddc(ddc_code) ⇒ NilClass
- #add_lcc(lcc_code) ⇒ NilClass
- #initialize(volume_info) ⇒ Alexandrite::Books constructor
Constructor Details
#initialize(volume_info) ⇒ Alexandrite::Books
13 14 15 16 17 18 |
# File 'lib/alexandrite_books.rb', line 13 def initialize(volume_info) add_origin(volume_info) add_basic_values(volume_info) add_industry_identifiers(volume_info, @origin) @error_message = volume_info[:error_message] end |
Instance Attribute Details
#authors ⇒ Object
Returns the value of attribute authors.
8 9 10 |
# File 'lib/alexandrite_books.rb', line 8 def @authors end |
#categories ⇒ Object
Returns the value of attribute categories.
8 9 10 |
# File 'lib/alexandrite_books.rb', line 8 def categories @categories end |
#country ⇒ Object
Returns the value of attribute country.
8 9 10 |
# File 'lib/alexandrite_books.rb', line 8 def country @country end |
#ddc ⇒ Object
Returns the value of attribute ddc.
8 9 10 |
# File 'lib/alexandrite_books.rb', line 8 def ddc @ddc end |
#description ⇒ Object
Returns the value of attribute description.
8 9 10 |
# File 'lib/alexandrite_books.rb', line 8 def description @description end |
#error_message ⇒ Object
Returns the value of attribute error_message.
8 9 10 |
# File 'lib/alexandrite_books.rb', line 8 def @error_message end |
#isbn10 ⇒ Object
Returns the value of attribute isbn10.
8 9 10 |
# File 'lib/alexandrite_books.rb', line 8 def isbn10 @isbn10 end |
#isbn13 ⇒ Object
Returns the value of attribute isbn13.
8 9 10 |
# File 'lib/alexandrite_books.rb', line 8 def isbn13 @isbn13 end |
#language ⇒ Object
Returns the value of attribute language.
8 9 10 |
# File 'lib/alexandrite_books.rb', line 8 def language @language end |
#lcc ⇒ Object
Returns the value of attribute lcc.
8 9 10 |
# File 'lib/alexandrite_books.rb', line 8 def lcc @lcc end |
#page_count ⇒ Object
Returns the value of attribute page_count.
8 9 10 |
# File 'lib/alexandrite_books.rb', line 8 def page_count @page_count end |
#published_date ⇒ Object
Returns the value of attribute published_date.
8 9 10 |
# File 'lib/alexandrite_books.rb', line 8 def published_date @published_date end |
#publisher ⇒ Object
Returns the value of attribute publisher.
8 9 10 |
# File 'lib/alexandrite_books.rb', line 8 def publisher @publisher end |
#suggested_classifications ⇒ Object
Returns the value of attribute suggested_classifications.
8 9 10 |
# File 'lib/alexandrite_books.rb', line 8 def suggested_classifications @suggested_classifications end |
#title ⇒ Object
Returns the value of attribute title.
8 9 10 |
# File 'lib/alexandrite_books.rb', line 8 def title @title end |
Class Method Details
.add_to_collection(book) ⇒ Object
22 23 24 |
# File 'lib/alexandrite_books.rb', line 22 def self.add_to_collection(book) @@collection.push(book) end |
.collection ⇒ Object
20 |
# File 'lib/alexandrite_books.rb', line 20 def self.collection = @@collection |
Instance Method Details
#add_classification_suggested(suggestions) ⇒ NilClass
36 |
# File 'lib/alexandrite_books.rb', line 36 def add_classification_suggested(suggestions) = @suggested_classifications = suggestions |
#add_ddc(ddc_code) ⇒ NilClass
28 |
# File 'lib/alexandrite_books.rb', line 28 def add_ddc(ddc_code) = @ddc = ddc_code |
#add_lcc(lcc_code) ⇒ NilClass
32 |
# File 'lib/alexandrite_books.rb', line 32 def add_lcc(lcc_code) = @lcc = lcc_code |