Skip to content

Commit

Permalink
Fixed a few bugs in review
Browse files Browse the repository at this point in the history
  • Loading branch information
gterrono committed Jan 17, 2013
1 parent a04a256 commit 00f7425
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions lib/classes/review.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,14 @@ def initialize(path)
json = PCR.get_json(path)

# Assign attrs
attrs = %(instructor num_reviewers num_students amount_learned comments
attrs = %w(instructor num_reviewers num_students amount_learned comments
retrieved id)
set_attrs(attrs, json)

# Assign ratings
ratings = json['ratings']
ratings.each do |name, val|
json['result']['ratings'].each do |name, val|
self.instance_variable_set("@#{name}", val)
attr_accessor name
self.class.send(:attr_accessor, name)
end
end
end
Expand Down

0 comments on commit 00f7425

Please sign in to comment.