Class: BookToolkit::BookData
Instance Attribute Summary collapse
-
#api_data_url ⇒ Object
Returns the value of attribute api_data_url.
-
#author ⇒ Object
Returns the value of attribute author.
-
#edition ⇒ Object
Returns the value of attribute edition.
-
#isbn ⇒ Object
Returns the value of attribute isbn.
-
#name ⇒ Object
Returns the value of attribute name.
-
#publisher ⇒ Object
Returns the value of attribute publisher.
-
#revision ⇒ Object
Returns the value of attribute revision.
-
#url ⇒ Object
Returns the value of attribute url.
Instance Method Summary collapse
-
#initialize(args = {}) ⇒ BookData
constructor
A new instance of BookData.
Constructor Details
#initialize(args = {}) ⇒ BookData
Returns a new instance of BookData.
6 7 8 9 10 11 12 |
# File 'lib/book_toolkit/book_data.rb', line 6 def initialize args={} args.each{ |k, v| send("#{k}=v") } if !@isbn.nil? @isbn = BookToolkit.to_isbn13 @isbn end end |
Instance Attribute Details
#api_data_url ⇒ Object
Returns the value of attribute api_data_url.
3 4 5 |
# File 'lib/book_toolkit/book_data.rb', line 3 def api_data_url @api_data_url end |
#author ⇒ Object
Returns the value of attribute author.
3 4 5 |
# File 'lib/book_toolkit/book_data.rb', line 3 def @author end |
#edition ⇒ Object
Returns the value of attribute edition.
3 4 5 |
# File 'lib/book_toolkit/book_data.rb', line 3 def edition @edition end |
#isbn ⇒ Object
Returns the value of attribute isbn.
3 4 5 |
# File 'lib/book_toolkit/book_data.rb', line 3 def isbn @isbn end |
#name ⇒ Object
Returns the value of attribute name.
3 4 5 |
# File 'lib/book_toolkit/book_data.rb', line 3 def name @name end |
#publisher ⇒ Object
Returns the value of attribute publisher.
3 4 5 |
# File 'lib/book_toolkit/book_data.rb', line 3 def publisher @publisher end |
#revision ⇒ Object
Returns the value of attribute revision.
3 4 5 |
# File 'lib/book_toolkit/book_data.rb', line 3 def revision @revision end |
#url ⇒ Object
Returns the value of attribute url.
3 4 5 |
# File 'lib/book_toolkit/book_data.rb', line 3 def url @url end |