Class: Previews::PackageReviews
- Inherits:
-
Object
- Object
- Previews::PackageReviews
- Defined in:
- lib/previews.rb
Instance Method Summary collapse
-
#initialize(locale, release, package) ⇒ PackageReviews
constructor
A new instance of PackageReviews.
-
#reviews ⇒ Object
Return Array of Hases.
Constructor Details
#initialize(locale, release, package) ⇒ PackageReviews
Returns a new instance of PackageReviews.
11 12 13 14 |
# File 'lib/previews.rb', line 11 def initialize(locale, release, package) @url = "http://reviews.ubuntu.com/reviews/api/1.0/reviews/filter/#{locale}/ubuntu/#{release}/any/#{package}/" @reviews = [] end |
Instance Method Details
#reviews ⇒ Object
Return Array of Hases
17 18 19 20 |
# File 'lib/previews.rb', line 17 def reviews download_reviews @reviews.flatten! end |