lib/npr/api/query_builder.rb in npr-0.1.2 vs lib/npr/api/query_builder.rb in npr-1.1.0

- old
+ new

@@ -42,14 +42,10 @@ end #----------------------- # Fire the query and return an Array of stories (or empty []) # - # Named +to_a+ to keep in line with ActiveRecord::Relation's - # naming convention. It is also aliased as +query+, which - # probably makes a little more sense. - # # Returns an Array. If the query returned any stories, then # it will be an array of those stories. If no stories were # returned, then it will be an empty array. # # There is no way to access the List or Messages returned @@ -71,10 +67,10 @@ # def to_a response = self.query stories = [] - if list = response.list + if response.list stories = Array.wrap(response.list.stories) end stories end