Class: Goodreads::Review

Inherits:
Object
  • Object
show all
Defined in:
lib/goodreads.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_nameObject

Returns the value of attribute author_name.



31
32
33
# File 'lib/goodreads.rb', line 31

def author_name
  @author_name
end

#average_ratingObject

Returns the value of attribute average_rating.



31
32
33
# File 'lib/goodreads.rb', line 31

def average_rating
  @average_rating
end

#bookObject

Returns the value of attribute book.



31
32
33
# File 'lib/goodreads.rb', line 31

def book
  @book
end

#book_descriptionObject

Returns the value of attribute book_description.



31
32
33
# File 'lib/goodreads.rb', line 31

def book_description
  @book_description
end

#book_idObject

Returns the value of attribute book_id.



31
32
33
# File 'lib/goodreads.rb', line 31

def book_id
  @book_id
end

#book_image_urlObject

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_urlObject

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_urlObject

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_publishedObject

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_urlObject

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

#descriptionObject

Returns the value of attribute description.



31
32
33
# File 'lib/goodreads.rb', line 31

def description
  @description
end

#guidObject

Returns the value of attribute guid.



31
32
33
# File 'lib/goodreads.rb', line 31

def guid
  @guid
end

#isbnObject

Returns the value of attribute isbn.



31
32
33
# File 'lib/goodreads.rb', line 31

def isbn
  @isbn
end

Returns the value of attribute link.



31
32
33
# File 'lib/goodreads.rb', line 31

def link
  @link
end

#pubDateObject

Returns the value of attribute pubDate.



31
32
33
# File 'lib/goodreads.rb', line 31

def pubDate
  @pubDate
end

#titleObject

Returns the value of attribute title.



31
32
33
# File 'lib/goodreads.rb', line 31

def title
  @title
end

#user_date_addedObject

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_createdObject

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_nameObject

Returns the value of attribute user_name.



31
32
33
# File 'lib/goodreads.rb', line 31

def user_name
  @user_name
end

#user_ratingObject

Returns the value of attribute user_rating.



31
32
33
# File 'lib/goodreads.rb', line 31

def user_rating
  @user_rating
end

#user_read_atObject

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_reviewObject

Returns the value of attribute user_review.



31
32
33
# File 'lib/goodreads.rb', line 31

def user_review
  @user_review
end

#user_shelvesObject

Returns the value of attribute user_shelves.



31
32
33
# File 'lib/goodreads.rb', line 31

def user_shelves
  @user_shelves
end