Class: Goodreads::Review
- Inherits:
-
Object
- Object
- Goodreads::Review
- Defined in:
- lib/goodreads.rb
Instance Attribute Summary collapse
-
#author_name ⇒ Object
Returns the value of attribute author_name.
-
#average_rating ⇒ Object
Returns the value of attribute average_rating.
-
#book ⇒ Object
Returns the value of attribute book.
-
#book_description ⇒ Object
Returns the value of attribute book_description.
-
#book_id ⇒ Object
Returns the value of attribute book_id.
-
#book_image_url ⇒ Object
Returns the value of attribute book_image_url.
-
#book_large_image_url ⇒ Object
Returns the value of attribute book_large_image_url.
-
#book_medium_image_url ⇒ Object
Returns the value of attribute book_medium_image_url.
-
#book_published ⇒ Object
Returns the value of attribute book_published.
-
#book_small_image_url ⇒ Object
Returns the value of attribute book_small_image_url.
-
#description ⇒ Object
Returns the value of attribute description.
-
#guid ⇒ Object
Returns the value of attribute guid.
-
#isbn ⇒ Object
Returns the value of attribute isbn.
-
#link ⇒ Object
Returns the value of attribute link.
-
#pubDate ⇒ Object
Returns the value of attribute pubDate.
-
#title ⇒ Object
Returns the value of attribute title.
-
#user_date_added ⇒ Object
Returns the value of attribute user_date_added.
-
#user_date_created ⇒ Object
Returns the value of attribute user_date_created.
-
#user_name ⇒ Object
Returns the value of attribute user_name.
-
#user_rating ⇒ Object
Returns the value of attribute user_rating.
-
#user_read_at ⇒ Object
Returns the value of attribute user_read_at.
-
#user_review ⇒ Object
Returns the value of attribute user_review.
-
#user_shelves ⇒ Object
Returns the value of attribute user_shelves.
Instance Method Summary collapse
-
#initialize(data) ⇒ Review
constructor
A new instance of Review.
Constructor Details
#initialize(data) ⇒ Review
Returns a new instance of Review.
54 55 56 57 58 59 60 61 62 63 |
# File 'lib/goodreads.rb', line 54 def initialize(data) data.each do |k, v| if v and v.is_a? String val = v.gsub(/\n/, '').gsub(/\t/, '').strip else val = v end send(:"#{k}=", val) end end |
Instance Attribute Details
#author_name ⇒ Object
Returns the value of attribute author_name.
31 32 33 |
# File 'lib/goodreads.rb', line 31 def @author_name end |
#average_rating ⇒ Object
Returns the value of attribute average_rating.
31 32 33 |
# File 'lib/goodreads.rb', line 31 def @average_rating end |
#book ⇒ Object
Returns the value of attribute book.
31 32 33 |
# File 'lib/goodreads.rb', line 31 def book @book end |
#book_description ⇒ Object
Returns the value of attribute book_description.
31 32 33 |
# File 'lib/goodreads.rb', line 31 def book_description @book_description end |
#book_id ⇒ Object
Returns the value of attribute book_id.
31 32 33 |
# File 'lib/goodreads.rb', line 31 def book_id @book_id end |
#book_image_url ⇒ Object
Returns the value of attribute book_image_url.
31 32 33 |
# File 'lib/goodreads.rb', line 31 def book_image_url @book_image_url end |
#book_large_image_url ⇒ Object
Returns the value of attribute book_large_image_url.
31 32 33 |
# File 'lib/goodreads.rb', line 31 def book_large_image_url @book_large_image_url end |
#book_medium_image_url ⇒ Object
Returns the value of attribute book_medium_image_url.
31 32 33 |
# File 'lib/goodreads.rb', line 31 def book_medium_image_url @book_medium_image_url end |
#book_published ⇒ Object
Returns the value of attribute book_published.
31 32 33 |
# File 'lib/goodreads.rb', line 31 def book_published @book_published end |
#book_small_image_url ⇒ Object
Returns the value of attribute book_small_image_url.
31 32 33 |
# File 'lib/goodreads.rb', line 31 def book_small_image_url @book_small_image_url end |
#description ⇒ Object
Returns the value of attribute description.
31 32 33 |
# File 'lib/goodreads.rb', line 31 def description @description end |
#guid ⇒ Object
Returns the value of attribute guid.
31 32 33 |
# File 'lib/goodreads.rb', line 31 def guid @guid end |
#isbn ⇒ Object
Returns the value of attribute isbn.
31 32 33 |
# File 'lib/goodreads.rb', line 31 def isbn @isbn end |
#link ⇒ Object
Returns the value of attribute link.
31 32 33 |
# File 'lib/goodreads.rb', line 31 def link @link end |
#pubDate ⇒ Object
Returns the value of attribute pubDate.
31 32 33 |
# File 'lib/goodreads.rb', line 31 def pubDate @pubDate end |
#title ⇒ Object
Returns the value of attribute title.
31 32 33 |
# File 'lib/goodreads.rb', line 31 def title @title end |
#user_date_added ⇒ Object
Returns the value of attribute user_date_added.
31 32 33 |
# File 'lib/goodreads.rb', line 31 def user_date_added @user_date_added end |
#user_date_created ⇒ Object
Returns the value of attribute user_date_created.
31 32 33 |
# File 'lib/goodreads.rb', line 31 def user_date_created @user_date_created end |
#user_name ⇒ Object
Returns the value of attribute user_name.
31 32 33 |
# File 'lib/goodreads.rb', line 31 def user_name @user_name end |
#user_rating ⇒ Object
Returns the value of attribute user_rating.
31 32 33 |
# File 'lib/goodreads.rb', line 31 def @user_rating end |
#user_read_at ⇒ Object
Returns the value of attribute user_read_at.
31 32 33 |
# File 'lib/goodreads.rb', line 31 def user_read_at @user_read_at end |
#user_review ⇒ Object
Returns the value of attribute user_review.
31 32 33 |
# File 'lib/goodreads.rb', line 31 def user_review @user_review end |
#user_shelves ⇒ Object
Returns the value of attribute user_shelves.
31 32 33 |
# File 'lib/goodreads.rb', line 31 def user_shelves @user_shelves end |