Class: ITunesAppReviews::Reviews
- Inherits:
-
Object
- Object
- ITunesAppReviews::Reviews
- Defined in:
- lib/itunes_app_reviews/reviews.rb
Instance Attribute Summary collapse
-
#start_date ⇒ Object
writeonly
Sets the attribute start_date.
Instance Method Summary collapse
- #each ⇒ Object
-
#initialize(store_id, app_id) ⇒ Reviews
constructor
A new instance of Reviews.
Constructor Details
#initialize(store_id, app_id) ⇒ Reviews
Returns a new instance of Reviews.
15 16 17 18 |
# File 'lib/itunes_app_reviews/reviews.rb', line 15 def initialize(store_id, app_id) @store_id = store_id @app_id = app_id end |
Instance Attribute Details
#start_date=(value) ⇒ Object (writeonly)
Sets the attribute start_date
13 14 15 |
# File 'lib/itunes_app_reviews/reviews.rb', line 13 def start_date=(value) @start_date = value end |
Instance Method Details
#each ⇒ Object
20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/itunes_app_reviews/reviews.rb', line 20 def each ITunesAppReviews::log.debug("Loading reviews (store_id: #{@store_id}, app_id: #{@app_id})") page = 0 while true page += 1 reviews = reviews_page(page) break if reviews.empty? reviews.each do |review| yield review end end end |